Extensive applications of quaternary ammonium compounds (QACs) in household and industrial products inevitably lead to their release into wastewaters; however, little attention has been paid to the acute effects on activated sludge. In this work, we investigated the responses of microorganisms in a membrane bioreactor (MBR) to transient shock loads of QACs with different alkyl chain length and their impacts on MBR performance. Results showed that QACs affected microbial viability and caused damage to key enzymes (e.g., ammonium monooxygenase and nitrite oxidoreductase), inhibiting organic matter degradation and nitrogen removal. The presence of QACs also caused negative influences on dehydrogenase activity, catalase and superoxide dismutase, thus increasing the production of reactive oxygen species. Moreover, QACs with longer alkyl chains and/or benzyl groups bonded to the nitrogen atom could induce a more severe damage to cell integrity and microbial viability. The interaction with QACs also induced the release of organic matters and the changes of adhesion properties of microbial products, resulting in aggravated membrane fouling in MBRs. Our results demonstrate the acute negative effects of QACs on activated sludge, and special attention should be paid to the performance of biological wastewater treatment processes subject to the shock loads of QAC-bearing industrial streams.Electronic supplementary materialThe online version of this article (10.1186/s13568-018-0649-5) contains supplementary material, which is available to authorized users.