To overcome the limitations of insufficient sensitivity and poor specificity of portable screen-printed carbon electrode-electrochemical sensors (SPCE-EC) in practical applications, we prepared carrier composites of carboxylic single-walled carbon nanotubes vertically grafted by covalent organic frameworks (v-COF@SWCNTs-COOH) and coated with a molecularly imprinted polymer (MIP) of sulfadimidine (SM2). 55 °C hot steam elution is more eco-friendly than traditional organic solvent elution. The results showed that when the mass ratio of DBA to DBA-SWCNTs was 1:1, the v-COF@SWCNTs-COOH obtained by the two-step synthesis method could increase the electrical signal up to 2.33-fold of the bare electrode. The bifunctional monomer MIP prepared on the above structure enhanced the signal response by 2.91-fold, with a high imprint factor of 20. The assembled MIP/v-COF@SWCNTs-COOH/SPCE were analyzed by differential pulse voltammetry (DPV) with a high sensitivity of 0.21 nM for LOD and 0.70 nM for LOQ. In milk and fish samples, the recovery rate was 95.0 %–104.8 %. The validation of authentic pork samples with the statutory LC-MS/MS method showed no significant difference (P > 0.05). The sensor's performance indicators remained robust after five repeated uses. Therefore, the MIP/v-COF@SWCNTs-COOH/SPCE combines the cheapness and portability of SPCE, while the sensitivity and specificity of small molecule detection were significantly improved.