An upconversion-gold nanoparticle detection system that integrates PCR amplification and fluorescence resonance energy transfer was constructed to enable swift and highly sensitive identification of Escherichia coli. The forward primer used in the PCR amplification is modified with sulfhydryl groups, enabling its connection to gold nanoparticles via Au-S bonds. The complementary strand of the forward primer, which is attached to the upconversion nanomaterials, can hybridize with the free forward primer through base complementary pairing. This interaction induces fluorescence resonance energy transfer, resulting in fluorescence quenching. The concentration of the target bacteria influences the amount of free primer in the system after PCR amplification, which subsequently alters the intensity of the upconversion fluorescence. The fluorescent PCR sensor developed based on the aforementioned principles demonstrated a detection limit of 14 CFU/mL for E. coli, with a quantitative detection range of 18-1.8 × 10