Endotoxins are potential toxics impacting human health through respiration derived in wastewater treatment plants (WWTPs), yet the formation of endotoxins during wastewater treatment processes is still lacking research. In our study, the distribution of endotoxins and bacterial community structure in the wastewater of three full scale pharmaceutical WWTPs were explored using the limulus amebocyte lysate (LAL) test and MiSeq technique. Results showed that higher endotoxin activities in the influent of Plant A and Plant C (560 and 1140 EU/mL), stemming from the fermentation process, were found compared to that of Plant B (135 EU/mL), coming from the process of chemical synthesis. During the anaerobic treatment and the cyclic activated sludge system (CASS) in the three WWTPs, the endotoxin activity increased, while it declined in the aerobic treatment system. In all bioreactors, the relative abundance of Gram-negative bacteria accounted for 50.0–94.6%. Bacteria with high lipopolysaccharide (LPS) in LAL assay were found at the genus level of Bacteroides, Enterococcus, Desulfovibrio, and Megasphaera.