This study employed a simple hydrolysis method to synthesize two novel nanocomposites: ZnO/g-C3N4 (ZCN) and TiO2/g-C3N4 (TCN). Characterization results confirmed the successful integration of ZnO and TiO2 nanoparticles onto g-C3N4 nanosheets, resulting in enhanced optical absorption in the visible light region. Both synthesized ZCN and TCN composites exhibited higher photocatalytic degradation efficiency of the antibiotic doxycycline under visible light irradiation compared to their individual component materials. This enhancement is attributed to the formation of heterojunction between TiO2 or ZnO and porous g-C3N4, which improves electron-hole pair separation and reduces recombination. The photocatalytic degradation kinetics of doxycycline using ZCN and TCN followed a pseudo-first-order model, with both catalysts demonstrating operational stability and effectiveness in antibiotic photodegradation.