The widespread occurrence of antibiotics in the environment poses a potential threat to human health. The photo-Fenton process has demonstrated better degradation performance compared with the conventional wastewater treatment processes. In this study, the degradation of cephalexin was evaluated comparatively by homogeneous (Fe2+/H2O2/UV) and heterogeneous (MoS2@Fe/H2O2/UV) photo-Fenton processes. Key influencing factors affecting photo-Fenton performance were assessed, confirming the optimum Fe2+ concentration at 0.2016 mg L−1 and H2O2/Fe2+ molar ratio at 6. Higher degradation efficiency (73.10%) and pseudo-first-order degradation rate constant (0.0078 min−1) were achieved with the assistance of MoS2@Fe as the heterogeneous catalyst. Completely different degradation products were identified in the homogeneous and heterogeneous photo-Fenton processes, with main degradation pathways proposed as β-lactam ring-opening, sulfoxide formation, demethylation, N-dealkylation, decarbonylation, hydroxylation and deamination in the Fe2+/H2O2/UV system and β-lactam ring-opening, hydroxylation, dehydration, amide hydrolysis, and demethylation and ring contraction in the MoS2@Fe/H2O2/UV system, respectively. The formation of newly identified products might root in the attack on cephalexin from active species (i.e., OH, h+, e−, O2−) photoinduced by the MoS2@Fe catalyst. Results also indicated the importance of understanding the underlying mechanisms and pathways to eliminate the antimicrobial activities of antibiotics in the future.