Memtransistor is a multiterminal device combining the concepts of memristor and field-effect transistor. Two-dimensional transition metal sulfides have unique electronic structure and properties, and they are widely used in electronic devices, energy conversions, memories and other fields. In this work, a two-dimensional ReSe
2/WSe
2heterostructure memtransistor is prepared, then the resistive switching characteristics under the electrical modulation, optical modulation, and electric-optical dual gate control are discussed. The results show that the gate control is an effective modulation method, which can change the on/off ratio of the device from 10
1to 10
5. Then, the resistance and on/off ratio of the memtransistor can be controlled by changing the light wavelength and the illumination power. Moreover, the switching ratio of the device can also be changed in a range of 10
2–10
5by electric and light dual-gate control, and the reasons for the change of resistance states of the device under different modulation conditions are analyzed. Furthermore, after 225 cycles and 1.9 × 10
4s, the ReSe
2/WSe
2heterostructure memtransistor still maintains a switch ratio close to 10
4, indicating the good stability and durability of the device. It demonstrates that the ReSe
2/WSe
2memtransistor will be one of potential candidates for the next- generation nonvolatile memory applications.