The anti-viral drug hydroxychloroquine (HCQ) has captivated significant interest in the pharmaceutical field, as it is a quinolone derivative. Its unrestrained occurrence causes prominent health hazards owing to its persistent, carcinogenic, recalcitrant, and teratogenic nature. Herein, in this work, an experimental investigation was carried out toward the photocatalytic degradation of HCQ drug using magnesium zirconate (MgZrO3) nanoparticles as an effective photocatalyst. A comprehensive characterizations of the as-synthesized material was carried out. The photocatalytic degradation of the HCQ drug was examined with various sources of light energies. The obtained outcomes indicated that ±85% of HCQ was degraded using a MgZrO3 photocatalyst within 30 min of the reaction time under UV-visible (ultraviolet) light irradiation. Further, other significant operational parameters such as various catalyst dosages, HCQ concentrations, pH, scavengers, and salts were examined. The degradation studies revealed that the reaction followed pseudo-first-order kinetics. Hence, this perovskite-type MgZrO3 has grasped profound attention in environmental remediation, significantly in photocatalytic degradation of HCQ drug. This comprehensive research offers green synthesis strategy as a substantial framework for providing effective photocatalyst that addresses contemporary water pollution issues linked to notable results. This aids in targeting era-driven advancements toward a clean and safe future environment.