The rapid discrimination of multiple foodborne pathogens is vital and challengeable in ensuring food safety. Herein, a facile fluorescence method was developed to distinguish different bacteria using multicolor-emissive carbon dots (CDs) based on confocal laser scanning microscopy (CLSM) and linear discriminant analysis (LDA). The array employs single CDs as receptors and indicators, two pH solutions and three excitation channels as sensing elements for multicolor imaging and recognition of multiple bacteria. Through one-step staining, the CDs were capable of rapid adsorbing onto all bacteria in 1 min with varying affinities. The discrimination ability of the array was markedly enhanced by means of the synergistic recognition of bacteria and CDs across diverse pH levels and three excitation channels. By using LDA, six kinds of bacteria could be well discriminated with the classification accuracy of 100%. Meanwhile, the feasibility has been successfully expanded to mixture and food samples discrimination.