Selective labeling of distinct bacteria and biofilm is poised for the fundamental understanding of bacterial activities, interactions, and coupled phenomena occurring at the microscale. However, a simple and effective way to achieve selective bacterial labeling is still lacking. Herein, we report a fluorescence probe with core-shell nanostructure that has polydopamine (PDA) coating on the surface of fluorescent silicon quantum dots (SiQDs@PDA). The surface of the SiQDs@PDA can be functionalized by various molecules (2-mercaptoethylamine hydrochloride, PEG, d-alanine, glucose amide) through different strategies (Michael addition, π-π interaction, and ion–ion interaction). Importantly, the d-alanine (D-Ala)- and gluconamide (Glc)-functionalized SiQDs@PDA fluorescence probes are capable of selectively labeling gram-positive and gram-negative bacteria, as well as their biofilms. The excellent performance in universal functionalization and selective labeling and imaging of bacteria and their biofilms demonstrate that SiQDs@PDA are a promising fluorescence tool in microbe research.