The ZnO–SnO 2 nanocomposite films, with Zn/Sn molar ratio from 1:1 to 5:1, were fabricated by sol–gel spin coating and annealed under 500°C. The films are composed of hexagonal wurtzite ZnO and tetragonal rutile SnO 2 without compound impurities. With increasing the Zn/Sn molar ratio, the growth of SnO 2 grain is inhibited, while that of the ZnO is promoted. The film transmittance decreases for higher Zn/Sn ratio due to scattering losses caused by pinhole and island growth in the film surface. We show that the film electrical property can be well engineered by embedding SnO 2 to ZnO matrix. First-principles calculation shows that more energy levels are involved between the Fermi level and valence band maximum with increasing the Sn content, and thus the carrier conductive is improved.