To clarify the effects of trace amount of antibiotics in wastewater on biofilm reactor, this study explored the effects of gradual increase of ciprofloxacin (CIP) and cefotaxime (CTX) ranging from 100 to 1000 ng·L−1 on the nitrogen and phosphorus removal and microbial community in a moving bed biofilm reactor (MBBR). Under different phases of CIP and CTX gradual increase, the resilience of culturable functional bacteria including ammonifying bacteria, nitrite oxidizing bacteria, aerobic denitrifying bacteria and phosphorus accumulating organisms in the biofilm was analyzed. High-throughput sequencing analysis was used to reveal the microbial community structure and species composition of functional bacteria. The results indicated that the treatment performance of MBBR was temporarily affected by trace CIP and CTX and returned to its original level within 1–2 days. Ammonifying bacteria exhibited strong resilience in trace CIP and CTX stress environments. Trace CIP and CTX altered the microbial community structure in biofilm, but the performance of nitrogen and phosphorus removal in MBBR was slightly affected. This might attribute to the rapid proliferation of Thauera, Dechloromonas and Candidatus_Accumulibacter on the carrier biofilm. The research results help to deepen the understanding of the impact of trace antibiotics on the MBBR and to provide a reference for the development of microbial germplasm resources for biological nitrogen and phosphorus removal from wastewater under antibiotic stress conditions.