This work presents the effect of magnesium (Mg) doping on the sensing properties of tin dioxide (SnO2) thin films. Mg-doped SnO2 films were prepared via a spray pyrolysis method using three doping concentrations (0.8 at.%, 1.2 at.%, and 1.6 at.%) and the sensing responses were obtained at a comparatively low operating temperature (160 °C) compared to other gas sensitive materials in the literature. The morphological, structural and chemical composition analysis of the doped films show local lattice disorders and a proportional decrease in the average crystallite size as the Mg-doping level increases. These results also indicate an excess of Mg (in the samples prepared with 1.6 at.% of magnesium) which causes the formation of a secondary magnesium oxide phase. The films are tested towards three volatile organic compounds (VOCs), including ethanol, acetone, and toluene. The gas sensing tests show an enhancement of the sensing properties to these vapors as the Mg-doping level rises. This improvement is particularly observed for ethanol and, thus, the gas sensing analysis is focused on this analyte. Results to 80 ppm of ethanol, for instance, show that the response of the 1.6 at.% Mg-doped SnO2 film is four times higher and 90 s faster than that of the 0.8 at.% Mg-doped SnO2 film. This enhancement is attributed to the Mg-incorporation into the SnO2 cell and to the formation of MgO within the film. These two factors maximize the electrical resistance change in the gas adsorption stage, and thus, raise ethanol sensitivity.