Three different lots of a residual Ziegler-Natta catalyst slurry (bearing Ti and Mg) obtained from an industrial petrochemical plant were employed as sources for the photocatalyst supported on silica. The effect of additional magnesium (1.0-25.0 wt% Mg/SiO2) on the photocatalytic properties of the doped materials was investigated. Doping the titania-based photocatalyst with Mg results in a shift in the absorption threshold toward the visible spectrum. The optical band gap energy of the bare supported photocatalyst was in the range of 2.5 eV and shifted to 1.72 eV after 25 wt% Mg doping. The systems were evaluated for the photodegradation of one dye (rhodamine B (RhB)) and two drugs (paracetamol and diclofenac sodium) either under ultraviolet (UV) (365 nm - UVA) or visible radiation, separately. Among the evaluated systems, doping with 25 wt% Mg afforded the highest degradation values for the target molecules under UV and visible radiation (i.e. 87%, 60% and 55% of the RhB, paracetamol and diclofenac under UV, respectively, and 82%, 48.3% and 48% under visible irradiation, respectively).