Escherichia coli (E. coli) O157:H7 is a pathogenic bacterium that causes serious toxic effects in the human gastrointestinal tract. In this paper, a method for its effective analytical control in a milk sample was developed. To perform rapid (1 h) and accurate analysis, monodisperse Fe3O4@Au magnetic nanoparticles were synthesized and used in an electrochemical sandwich-type magnetic immunoassay. Screen-printed carbon electrodes (SPCE) were used as transducers, and electrochemical detection was performed by chronoamperometry using a secondary horseradish peroxidase-labeled antibody and 3,3′,5,5′-tetramethylbenzidine. This magnetic assay was used to determine the E. coli O157:H7 strain in the linear range from 20 to 2 × 106 CFU/mL, with a limit of detection of 20 CFU/mL. The selectivity of the assay was tested using Listeria monocytogenes p60 protein, and the applicability of the assay was assessed by analyzing a commercial milk sample, demonstrating the usefulness of the synthesized nanoparticles in the developed magnetic immunoassay.