Lead sulfide (PbS), as an excellent narrow band gap material, has a wide range of applications in short-wave infrared detection. In this study, Si/PbS photodetectors are fabricated by an electrochemical deposition technique to grow PbS materials inside a patterned silicon window. The deposited PbS materials were characterized using SEM, TEM, and XRD. The PbS morphology and particle size were investigated by varying the electrochemical deposition time and precursor solution concentration ratio to assess the photoelectric properties. The results show that the size and thickness of the PbS material decrease with the increase of sulfur content, which also affects the photoelectric performance of the detector. When Pb: S = 1:1, the specific detectivity reaches its maximum value of 1.3 × 10 9 Jones. With the increase of the sulfur content, the responsivity and detectivity of the device decrease, but the response time is reduced. When Pb: S = 1:9, the response/recovery time is 0.25 s/0.23 s, while the dark current is as low as 1.58 × 10 −8 A. This method of optimizing the performance by modulating the size and thickness of the PbS material provides a novel approach for the development of Si/PbS heterostructure photodetectors.