Non-fullerene acceptors (NFAs) have significantly contributed to the advancement of organic optoelectronic devices. However, their undesirable chemical reaction with adjacent interfacial layers and weak absorption in near infrared (NIR) region limit the further improvement of device performance. Herein, we employed chemically robust and NIR-responsive O6T-4F as NFA and enhanced the performance of both organic solar cells (OSCs) and organic photodetectors (OPDs) by interfacial engineering and compositional modulation. Bathocuproine cathode interfacial layer strengthens the interfacial contact due to the strong mechanical adhesion with active layer. Incorporating an appropriate content of PC61BM in the active layer promotes the molecular ordering and tunes the orientation of O6T-4F from flat-on and edge-on lamellar crystalline to J-type π-π stacking, thereby extending the absorption spectrum from 950 nm to 1050 nm. Moreover, ternary blend film approaches intrinsic type semiconductor, achieving an extremely low dark current. As a result, the optimized OSCs achieve a power conversion efficiency of 13.23% while the corresponding self-powered OPDs render an impressive detectivity of 1.10 × 1014 Jones at 840 nm and over 1.10 × 1013 Jones in a wide wavelength range (330–1050 nm). Finally, we realized high-quality visible and NIR imaging with 80 × 260 pixels using the fabricated OPD. Our work demonstrates that combined strengthening interfacial contact and compositional modulation is an effective strategy to improve the performance of both OSCs and OPDs.