Quinolone residues resulting from body metabolism and waste discharge pose a significant threat to the ecological environment and to human health. Therefore, it is essential to monitor quinolone residues in the environment. Herein, an efficient and sensitive matrix-assisted laser desorption/ionization mass spectrometry (MALDI/MS) method was devised by using a novel molecularly imprinted heterojunction (MIP-TNs@GCNs) as the matrix. Molecularly imprinted titanium dioxide nanosheets (MIP-TNs) and graphene-like carbon nitrides (GCNs) were associated at the heterojunction interface, allowing for the specific, rapid, and high-throughput ionization of quinolones. The mechanism of MIP-TNs@GCNs was clarified using their adsorption properties and laser desorption/ionization capability. The prepared oxygen-vacancy-rich MIP-TNs@GCNs heterojunction exhibited higher light absorption and ionization efficiencies than TNs and GCNs. The good linearity (in the quinolone concentration range of 0.5−50 pg/ μL, R 2 > 0.99), low limit of detection (0.1 pg/μL), good reproducibility (n = 8, relative standard deviation [RSD] < 15%), and high salt and protein resistance for quinolones in groundwater samples were achieved using the established MIP-TNs@GCNs−MALDI/ MS method. Moreover, the spatial distributions of endogenous compounds (e.g., amino acids, organic acids, and flavonoids) and xenobiotic quinolones from Rhizoma Phragmitis and Rhizoma Nelumbinis were visualized using the MIP-TNs@GCNs film as the MALDI/MS imaging matrix. Because of its superior advantages, the MIP-TNs@GCNs−MALDI/MS method is promising for the analysis and imaging of quinolones and small molecules.