This study presents the fabrication of MgxZn(100-X)O thin films (TFs) with Mg concentration levels (x) of 0.5 at%, 1.0 at%, 1.5 at%, and 2.0 at% on glass substrates using the novel laser-assisted chemical bath growth (LACBG) method, aimed at investigating their photo-response for potential UV photodetector applications. Utilizing a continuous wave semiconductor laser with a 444.5 nm wavelength, 1 W power, and 6 min of irradiation, the LACBG method successfully produced high-quality Mg-doped ZnO TFs. These films were deposited on glass substrates coated with silver (Ag) to serve as electrode contacts for constructing a metal-semiconductor-metal (MSM) UV photodetector. The structural, optical, and electrical properties of the TFs were thoroughly analyzed. X-ray diffraction (XRD) and scanning electron microscopy (SEM) were employed to examine the crystal microstructures and surface morphologies, revealing vertically aligned hexagonal symmetrical sub-micro tubes. In contrast, energy dispersive X-ray (EDX) analysis confirmed successful Mg incorporation into the ZnO lattice. UV–visible absorbance spectra indicated a blue shift in the absorption edge and increased band gap energy from 3.24 eV to 3.67 eV with rising Mg content. The UV photodetectors, particularly those with 2.0 at% Mg-doped ZnO TFs, demonstrated significantly enhanced UV responsiveness attributed to optical confinement, high surface-to-volume ratio, and superior structural quality. Performance metrics for the 2.0 at% Mg-doped ZnO TFs included a responsivity of 10.60 A/W, external quantum efficiency of 34.10, specific detectivity of 2.25 × 107 Jones, noise equivalent power of 5.34 × 10−11 W, rise time of 86.9 ms, and decay time of 324.4 ms. These findings underscore the potential of Mg-doped ZnO TFs for high-performance UV photodetection applications. The novelty of this study lies in utilizing LACBG to achieve high-quality Mg-doped ZnO TFs, offering a cost-effective, low-temperature method that enhances UV photodetector performance.