Magnetic molecularly imprinted polymers (MIPs) capable of selectively recognizing and absorbing 4,4
′
-methylenedianiline (MDA) were successfully synthesized, using Fe3O4 coated with mesoporous silicon (Fe3O4@mSiO2) as the magnetic carrier, 4-vinyl pyridine (4-VP) as the functional monomer, ethylene glycol dimethacrylate (EGDMA) as the cross-linking agent, and MDA as the template molecule. The morphology, structure, and properties of MIPs were characterized, suggesting that the MIPs had obvious core-shell structure and strong magnetic responsiveness. The results of adsorption property tests showed that the MIPs could specifically recognize and adsorb MDA with excellent selectivity and reusability. The adsorption kinetic process could be described by the pseudo-second-order kinetic model, and the adsorption isotherm could be fitted by the Langmuir model, with a maximum adsorption capacity of 59.5 μmol/g. Furthermore, the magnetic MIPs have been applied to the electrochemical detection of MDA from the composite film sample, with recoveries in the range from 87.8% to 92.5% and the RSD values less than 4.4%. The prepared magnetic MIPs showed potential for the selective separation and detection of MDA in food-contact materials.