We present a facile photochemical route to load Ag nanoparticles on hierarchical ZnO microspheres forming Ag–ZnO nanocomposites, which were characterized by X-ray powder diffraction (XRD), field emission scanning electron microscopy (FE-SEM), high resolution transmission electron microscopy (HR-TEM), and Raman spectroscopy. The results reveal that Ag nanoparticles with average diameters of 5–6 nm are uniformly deposited on the surface of ZnO, and there are not any voids or organic linkers or surfactants at the interfaces between Ag and ZnO. The distribution density of Ag nanoparticles on ZnO can be tuned by the concentration of the silver precursor. In addition, the hierarchical ZnO microspheres and Ag–ZnO nanocomposites were configured as high performance sensors to detect ethanol and formaldehyde. Importantly, in comparison with the pure ZnO microspheres, the Ag-loaded ZnO nanocomposite sensors show 8.9-fold and 2.1-fold enhancement in gas responses to 100 ppm of ethanol and formaldehyde at 350 °C, respectively. This enhancement may originate from the effective chemisorption of molecular oxygen or atomic oxygen on Ag in the Ag–ZnO nanocomposites.