A novel UCNPs based FRET aptasensor was first developed to detect bacteria. The system avoids target separation procedures and enables rapid, ultrasensitive and specific bacteria detection. The sensitivity of the developed aptasensor is comparable or even higher than that achieved in previous studies. The aptasensor was further used to detect E. coli in tap/pond water and milk.