The spray pyrolysis is the simple and most promising thin-film fabrication technique in the deposition of Vanadium pentoxide (V2O5) thin film. Thin films of pure V2O5 and Magnesium (Mg) doped V2O5 were fabricated by spraying precursor solution on a glass substrate by spray pyrolysis at 350 °C. The doping concentrations of 1, 3, 5, & 10 wt% of Mg deposited followed by the heat treatment process at 350 °C. Field emission scanning microscopy (FESEM) and atomic force microscope (AFM) images have been used to study the morphology of the film showed the presence of white nanoparticles and surface roughness thereby effect of doping have been noticed. The XRD study shows the increase in the growth of film in (200) direction and enhancement in crystallite size with increase in doping. EDAX study confirms the presence of vanadium and doped Magnesium. Optical property study using UV–visible spectroscopy shows a rapid decrease in absorbance whereas transmittance increases with an increase in wavelength and also observed varying optical bandgap (Eg) from 3.55 eV to 3.75 eV for pure and Mg-doped V2O5 thin films. Compared to other transition metals, V2O5 exhibits properties appropriate for lithium-ion batteries and sensor applications at very low Mg-doping concentrations.