In this study, two magnetic activity-based protein profiling probes based on cephradine and amoxicillin were first synthesized that were used to produce the natural penicillin-binding protein 2 of Escherichia coli. After characterization by using LC-ESI-MS/MS, it was found that the obtained proteins by using the two probes were the same. The molecular docking for 28 betalactam antibiotics showed that the key amino acids were Ser330 and Ser387, the main intermolecular forces were hydrogen bond and hydrophobic interaction, and the main binding sites in their molecules were on the beta-lactam ring. Then this protein was combined with streptavidin-labeled tracer and biotinylated fluorescein isothiocyanate to establish a signal-amplified fluorescence polarization assay to determine the 28 drugs in milk. The limits of detection ranged from 0.07 to 2.21 ng/mL, and the sensitivities for the 28 drugs were improved 4 to 48-fold in comparison with the use of a fluorescein isothiocyanate-labeled fluorescent tracer. Therefore, this method could be used for rapid multiscreening of the 28 beta-lactam antibiotics in milk.