Pathogenic bacterial contamination of food is a major challenge in food safety and public health management. To monitor pathogenic bacteria in food, a rapid, sensitive, and specific pathogen detection method is needed. CRISPR-Cas12a has been developed as a sensitive method for detecting pathogenic bacteria, but its output signal is fluorescent, which need equipment to detect. Here, the nanoparticle probe was designed to detect the activity of Cas12a and were able to visualize the assay results by observing the color change by naked eyes. The target sequences of pathogenic bacteria were amplified by recombinase polymerase, then recognized and bound by the crRNA and Cas12a complex. The activated Cas12a cleaved the linker-ssDNA connecting the nanoparticles, causing the nanoparticles to transition from aggregation to dispersion, and the color showed as purple. The sensitivity analysis showed that the limits of detection (LOD) reached 1 × 10°CFU/mL, 1 × 104 CFU/mL, 1 × 102 CFU/mL, 1 × 103 CFU/mL, 1 × 101 CFU/mL for Escherichia coli, Salmonella typhimurium, Vibrio parahaemolyticus, Staphylococcus aureus, and Listeria monocytogenes, which were all specific for five bacteria in the milk samples. Therefore, this method is a dependable, fast, sensitive and specific method, which make the CRIPSR-Cas12a detection method more useful in bacterial pathogenic detection.