In this study, magnetic multi-template molecularly imprinted polymers (MMIPs) are successfully synthesized. The synthesis is carried out by a multi-template surface imprinting strategy using mesoporous silica-coated magnetic graphene oxide as the support material, matrine (MT), oxymatrine (OMT) and sophocarpine (SC) as the templates, 4-vinylbenzoic acid as the functional monomer, and ethylene glycol dimethacrylate (EDGMA) as the cross-linker. The MMIPs were characterized using Fourier-transform infrared spectroscopy, X-ray diffraction, scanning electron microscopy, and transmission electron microscopy. The maximum adsorption capacity of the prepared MMIPs was found to be 9.01, 20.87, and 7.76 mg/g for MT, OMT, and SC, respectively, demonstrating higher adsorption capacity compared to the non-imprinted polymers (MNIPs). Furthermore, MMIPs were utilized as adsorbents for magnetic solid-phase extraction (MSPE) in conjunction with pressurized capillary electrochromatography (pCEC) for the simultaneous separation and detection of MT, OMT, and SC in the Chinese herbal medicine substrate sophora. The factors affecting the extraction efficiency of MSPE, including the type of elution solvent, amount of adsorbent, pH of the sample solution, elution time, and eluent volume, were optimized. The MMIPs-pCEC method demonstrated a satisfactory linear response within the concentration range of 1-50 µg/mL for the three alkaloids, with correlation coefficients ranging from 0.9923 to 0.9972 and limits of detection ranging from 0.09 to 0.73 µg/mL. The findings of the present study demonstrate that MMIPs have important applications in the analysis of active ingredients in traditional Chinese medicine.