The increased occurrence of antibiotic residues in wastewater raises environmental issues. This study examines the transformation products (TPs) produced by chlorination (Cl) of two commonly used pure β-lactam antibiotics, Ampicillin-1000 (AMP) and Amoxicillin-3000. The study delves deeper into the degradation processes of chlorinated antibiotics and the generation of their by-products by direct (light) and indirect photodegradation (using microalgae Chlorella sorokiniana). Liquid chromatography-mass spectrometry (LCMS) identified transformation products (TPs) of AMOX-Cl with m/z ratios Isobutane (58) and 2-amino-2-(4-hydroxyphenyl)-N-methylacetamide (180), while the TPs of AMP-Cl exhibited m/z ratios of Isobutane (58) and 2-amino-N-methyl-2-phenylacetamide (164). Bacteriostatic analysis revealed that chlorination increased the antibiotics inhibitory effects against Staphylococcus aureus (S. aureus) and Escherichia coli (E. coli). Remarkably, microalgae treatment completely eliminated bacterial growth inhibition within 96 h, while light exposure had minimal effect. Additionally, the study examined that Cl-stress affected microalgae's biochemical composition (lipid content in AMP-Cl 25.5 ± 0.56 % and AMOX-Cl 27.7 ± 0.54 %), biomass (AMOX-Cl 1180 ± 1.18 mg/L and AMP-Cl 1540 ± 0.67 mg/L), and photosynthetic pigments (Chl-a 2.01 ± 0.03 μg/mL, carotenoids 1.08 ± 0.03 μg/mL in AMOX-Cl) and (Chl-a 2.33 ± 0. 0.04 μg/mL, carotenoids 0.92 ± 0.07 μg/mL in AMP-Cl). Detected metabolites composition was assessed using Nuclear Magnetic Resonance (NMR) and a hierarchical cluster analysis heat map was constructed.