An immunomagnetic optical probe based on a core/shell magnetic nanoparticle–quantum dot was fabricated for detection of Streptococcus agalactiae, the causative agent of pneumonia and meningitis in newborns. The silica-coated magnetic nanoparticles conjugated with anti-S. agalactiae monoclonal antibody provided high specificity for pre-enrichment of bacteria from biological samples with a complex matrix such as milk. (366 characters)