Ambient mass spectrometry allows direct analysis of various sample types with minimal or no pretreatment. However, due to the influence of matrix effects, there are sensitivity and issues in analyzing trace analytes in complex food samples. In this work, we developed a spray mass spectrometry platform based on SSS@TPBD-TPA@MIPs (Stainless steel substrate (SSS), terephthalaldehyde (TPA), N, N, N′, N′-tetrakis(p-aminophenyl)-p-phenylenediamine (TPBD), molecularly imprinted polymer (MIP)), for rapid, in situ, high-throughput, highly enrichment efficiency and highly selective trace analysis of aflatoxins. By simplifying the sample pretreatment and directly applying high voltage for ESI-MS, the analysis can be completed within 1 min. The established method base on SSS@TPBD-TPA@MIPs exhibited high sensitivity and accuracy when determine trace level AFs in maize and peanuts. The results demonstrated a good linear relationship within the range of 0.01–10 μg/L, with the determination coefficient (R2) ≥ 0.9956. The limits of detection (LODs) was 0.035–0.3 ng/mL and limits of quantitation (LOQs) was 0.12–0.99 ng/mL, with acceptable recovery rate of 82.09–115.66 % and good repeatability represented by the relative standard deviation (RSD) less than 17.43 %. Furthermore, SSS@TPBD-TPA@MIPs exhibited excellent reusability, with more than 8 repeated uses, and showed good adsorption performance.