It is significant to develop a heterogeneous integration technology to promote the application of two dimensional (2D) materials in silicon roadmap. In this paper, we reported a field-effect WSe2/Si heterojunction diode based on ambipolar 2D WSe2 and silicon on insulator (SOI). Our results indicate that the device exhibits a p-n diode behavior with a rectifying ratio of ~300 and an ideality factor of 1.37. As a photodetector, it has optoelectronic properties with a response time of 0.13 ms, responsivity of 0.045 A/W, detectivity of 4.5 × 1010 Jones and external quantum efficiency (EQE) of 8.9 %. Due to the ambipolar behavior of the WSe2, the rectifying and optoelectronic properties of the heterojunction diode are of the ability to be modulated by the gate electrical field, enabling various potential applications such as logic optoelectronic devices and neuromorphic optoelectronic devices for in-sensor computing circuits. Thanks to the process based on the mature SOI technique, our field-effect heterojunction diode should have obvious advantages in device isolation and integration.