To use resistive random-access memory (ReRAM) in various attractive applications, the guidelines of the device structure are required for controlling memory characteristics. In this study, 3D simulation of oxygen vacancy (VO) diffusion was performed by adopting a combination of Soret and Fick diffusions as driving forces of VOs in NiO layers of Me/NiO/Me devices (Me = Pt, Ru, W). It was demonstrated that the reciprocating motion of VOs, accompanying resistive switching, could be reproduced consistently with good cycling endurance for unipolar-type ReRAM. Furthermore, our simulation revealed that the thermal flow from the NiO layer to the electrode (EL) caused VO migration in the vertical direction, and affected both SET and RESET switching in contrast to previous reports. Accordingly, it is clear that the three-dimensional thermal design of the device structure considering ELs is crucial for tuning memory characteristics by controlling the balance of Fick and Soret diffusions.