This work describes an electrochemical sensor for the selective recognition and quantification of amoxicillin and a β-lactam antibiotic in real samples. This sensor consists of a carbon paste electrode (CPE) modified with mag-MIP (magnetic molecularly imprinted polymer), which was prepared by precipitation method via free radical using acrylamide (AAm) as functional monomer, N,N′-methylenebisacrylamide (MBAA) as a crosslinker, and potassium persulfate (KPS) as initiator, to functionalized magnetic nanoparticles. The magnetic non-imprinted polymers (mag-NIP) were prepared using the same experimental procedure without analyte and used for the preparation of a CPE for comparative studies. The morphological, structural, and electrochemical characteristics of the nanostructured material were evaluated using Field emission gun scanning electron microscopy (FEG-SEM), Transmission electron microscopy (TEM), Fourier transform infrared spectroscopy (FTIR), Vibrating sample magnetometry (VSM), X-ray diffraction (XRD), and voltammetric technique. Electrochemical experiments performed by square wave voltammetry show that the mag-MIP/CPE sensor had a better signal response compared to the non-imprinted polymer-modified electrode (mag-NIP/CPE). The sensor showed a linear range from 2.5 to 57 μmol L−1 of amoxicillin (r2 = 0.9964), with a limit of detection and a limit of quantification of 0.75 and 2.48 μmol L−1, respectively. No significant interference in the electrochemical signal of amoxicillin was observed during the testing experiments in real samples (skimmed milk and river water). The proposed mag-MIP/CPE sensor could be used as a good alternative method to confront other techniques to determine amoxicillin in different samples.