Modulation between optical and ferroelectric properties was realized in a lateral structured ferroelectric CuInP2S6 (CIPS)/semiconductor MoS2 van der Waals (vdW) heterojunction. The ferroelectric hysteresis loop area was modulated by the optical field. Two types of photodetection properties were realized in a device by changing the ON and OFF states of the ferroelectric layer. The device was used as a photodetector in the OFF state but not in the ON state. Higher tunnelling electroresistance (TER) (~1.4×104) in a lateral structured ferroelectric tunnelling junction was crucial, and it was analyzed and modulated by the barrier height and width of the ferroelectric CIPS/semiconductor MoS2 Schottky junction. The new parameter of the ferroelectric hysteresis loop area as a function of light intensity was introduced to analyze the relationship between the ferroelectric and photodetection properties. The proposed device has potential application as optoelectronic sensory cells in the biological nervous system or as a new type of photodetector.