Studying the changes in organic matter and characteristic pollutants during the treatment of penicillin-containing pharmaceutical wastewater, which can be reflected by changes in dissolved organic matter (DOM), is crucial for improving the effectiveness of wastewater treatment units and systems. Herein, water quality indicators, spectroscopic methods, and Fourier-transform ion cyclotron resonance mass spectrometry were utilized to characterize the general molecular compositions and specific molecular changes in DOM during the treatment of typical penicillin-containing pharmaceutical wastewater, including in each of the influent, physicochemical treatment, biological treatment, oxidation treatment, and effluent stages. The influent exhibited a high organic matter content (concentration of dissolved organic carbon >10,000 mg·L−1), its DOM mainly contained protein- and lignin-like substances composed of CHON and CHONS molecules, and the relative intensity (RI) of penicillin was extremely high (RI = 0.220). Compared with the influent, the abundance of CHON and CHONS molecules detected after physicochemical treatment decreased by 70.3 % and 62.5 %, respectively, and the RI of penicillin decreased by 85.5 %. Biological treatment caused substantial changes in DOM components through oxidation, dealkylation, and denitrification reactions, accounting for 36.8 %, 28.9 %, and 14.8 % of the total identified reactions, respectively. Additionally, lignin-like substances were generated in large quantities, the overall humification level significantly increased, and the RI value increased for the penicillin intermediate, 6-aminopenicillanic acid (6-APA). Oxidation treatment effectively removed phosphorus-containing substances and some lignin-like substances produced by biological treatment; however, it was not effective in removing characteristic pollutants such as 6-APA. Such characteristic substances continued to be present in the effluent, and the DOM mainly contained protein- and humus-like substances, accounting for 30.8 % and 47.3 %, respectively. The study findings reveal the changes in organic matter and characteristic pollutants during the treatment of penicillin-containing wastewater from the perspective of the general molecular composition and specific molecular changes in DOM, providing support for further exploration of wastewater treatment mechanisms and improvements in treatment unit efficiency.