Tin-lead (Sn-Pb) mixed perovskites are extensively investigated in near-infrared (NIR) photodetectors (PDs) owing to their excellent photoelectric performance. However, achieving high-performance Sn-Pb mixed PDs remains challenging, primarily because of the rapid crystallization and the susceptibility of Sn2+ to oxidation. To address these issues, this study introduces the multifunctional molecules 2,3-difluorobenzenamine (DBM) to modulate the crystallization of Sn-Pb mixed perovskites and retard the oxidation of Sn2+, thereby significantly enhancing film quality. Compared with the pristine film, Sn-Pb mixed perovskite films modulated by DBM molecules exhibit a highly homogeneous morphology, reduced roughness and defect density. The self-powered NIR PDs fabricated with the improved films have a spectral response range from 300 to 1100 nm, a peak responsivity of 0.51 A W-1, a specific detectivity as high as 2.46 × 1011 Jones within the NIR region (780 to 1100 nm), a linear dynamic range exceeding 152 dB, and ultrafast rise/fall time of 123/464 ns. Thanks to the outstanding performance of PDs, the fabricated 5 × 5 PDs array demonstrates superior imaging ability in the NIR region up to 980 nm. This work advances the development of Sn-Pb mixed perovskites for NIR detection and paves the way for their commercialization.