With the pandemic of COVID-19, the application of quaternary ammonium compounds (QACs), which can be used in SARS-CoV-2 disinfection products, has increased substantially. QACs cumulated in sewer system are ultimately deposited and enriched in sludge. QACs in the environment can adversely affect human health and the environment. In this study, a liquid chromatography-mass spectrometry method was established for the simultaneous determination of 25 QACs in sludge samples. Ultrasonic extraction and filtration of the samples was performed using a 50mM hydrochloric acid-methanol solution. The samples were separated by liquid chromatography and detected in multiple reaction monitoring mode. The matrix effects of the sludge on the 25 QACs ranged from - 25.5% to 7.2%. All substances showed good linearity in the range of 0.5-100ng/mL, with all determination coefficients (R2) greater than 0.999. The method detection limits (MDLs) were 9.0ng/g for alkyltrimethylammonium chloride (ATMAC), 3.0ng/g for benzylalkyldimethylammonium chloride (BAC), and 3.0ng/g for dialkyldimethylammonium chloride (DADMAC). The spiked recovery rates were in the range of 74-107%, while the relative standard deviations were in the range of 0.8-20.6%. Considering its sensitivity, accuracy, and easy operation, the proposed method in this study was used to determine 22 sludge samples collected from a comprehensive wastewater treatment plant. The results showed that the concentrations of ΣATMACs, ΣBACs, and ΣDADMACs were 19.684, 3.199, and 8.344μg/g, respectively. The main components included ATMAC-C16, ATMAC-C18, ATMAC-C20, ATMAC-C22, BAC-C12, and DADMAC-C18:C18, with concentrations exceeding 1.0μg/g. The concentration relationships of different components in the congeners showed that some components were of similar origin.