The abuse of tetracycline can lead to its residue in animal derived foods, posing many potential hazards to human health. Therefore, rapid and accurate detection of tetracycline is an important means to ensure food safety. Nitrogen doped and phosphorus doped silicon quantum dots (N-SiQDs, P-SiQDs) with remarkable optical stability were fabricated via a one-pot hydrothermal procedure in this study. Upon the excitation at 346 nm, N-SiQDs and P-SiQDs emitted fluorescence at 431 nm and 505 nm, respectively. Two SiQDs had the potential to serve as a probe for detecting low concentrations of tetracycline (TC), employing a mechanism of the static quenching effect. The calibration curves of N-SiQDs and P-SiQDs were linear within the range of 0–0.8 μM and 0–0.4 μM, the limits of detection were low as 5.35 × 10−4 μmol/L and 6.90 × 10−3 μmol/L, respectively. This method could be used successfully to detect TC in honey samples. Moreover, the remarkable antibacterial efficacy of two SiQDs could be attributed to the generation of a large number of intracellular reactive oxygen species. The SEM images showed that the structure of bacterial cell was disrupted and the surface became irregular when treated with both SiQDs. These properties enabled potential usage of SiQDs as excellent antibacterial material for different biomedical applications.