ENPP1, a transmembrane glycoprotein overexpressed in various cancers, has become a promising target for tumor immunotherapy. Several ENPP1 inhibitors have been reported, but only a few have been validated in vivo. Herein, based on the reported inhibitors 3 and 6, we carried out a structural optimization by designing a variety of 8-methoxyquinazoline and its equivalent 8-methoxy-3-cyano-quinoline derivatives featuring bridged- or spirobicycles as the linker. Compound 30 was identified as a promising ENPP1 inhibitor. This compound exhibited IC50 values of 8.05 nM against ENPP1 and 1.53 nM in MDA-MB-231 cells with no significant inhibitory effects against both hERG and a panel of 97 kinases. It effectively activated the intracellular STING pathway by inhibiting cGAMP degradation. In the murine CT-26 tumor model, 30 inhibited tumor growth with increased immune cell infiltration in the tumor microenvironment and enhanced type I interferon responses. Meanwhile, compound 30 synergically enhanced the antitumor efficacy of anti-PD-L1 antibody.