Early screening of foodborne pathogens is a key to ensure food safety. In this study, we developed a microfluidic biosensor for online and sensitive detection of Salmonella based on immunomagnetic separation, fluorescence labeling and smartphone video processing. First, the immune magnetic nanoparticles were used to specifically separate and efficiently concentrate the target bacteria and the magnetic bacteria were formed. Then, the magnetic bacteria were labeled with the immune fluorescent microspheres and the fluorescent bacteria were formed. Finally, the fluorescent bacteria were continuously injected into the microfluidic chip on the smartphone-based fluorescent microscopic system, and the fluorescent spots were online counted using the smartphone App based on inter-frame difference algorithm to obtain the amount of the target bacteria. Under the optimal conditions, this proposed biosensor was able to quantitatively detect Salmonella typhimurium ranging from 1.4 × 102 to 1.4 × 106 CFU/mL, and its lower detection limit was 58 CFU/mL. This biosensor could be extended for detection of multiple foodborne pathogens using different fluorescent materials.