To determine the effect of oxytetracycline on the anaerobic biological treatment of livestock wastewater, we studied the removal efficiency of chemical oxygen demand (determined by K2Cr2O7, CODCr), methane production, and bacterial diversity under the stress of different concentrations of oxytetracycline. Results indicated that the removal of COD and the yield of methane were inhibited by oxytetracycline. With an increase in oxytetracycline concentration, methane production decreased from 392 to 207mL (the control group was 448 mL) and COD removal efficiency fell from 92% to 84% (the control group was 94%). Results of PCRDGGE (polymerase chain reaction and denaturing gradient gel electrophoresis) indicated that, with an increase in oxytetracycline concentration, the richness values of the bacterial community fell from 0.86 to 0.45 (the control group was 1). In addition, oxytetracycline reduced COD removal efficiency, methane production, and bacterial diversity in livestock wastewater. Results presented in this study provide important information about bacterial diversity in livestock wastewater treated using oxytetracycline.