The role of acceptor and donor defects in epitaxial Al-doped SnO2 films were systematically investigated. Al doping introduces acceptor defects (AlSn) at low doping concentration while donor ones (Ali) in a concentration range from 8 to 10at%. The band gap is firstly narrowed by hole-doping and then widened by electrons introduced by oxygen vacancies and Ali. Air-annealing absorbs oxygen and makes Al ions transformed from AlSn to Ali, corresponding to a decrease (increase) in the band gap when most Al ions occupy the substitutional (interstitial) sites. The saturation magnetization of the films is enhanced by AlSn doping, with the maximum value in the Sn0.98Al0.02O2 film. The magnetic moment is contributed by the localized holes introduced by AlSn. The existence of the ferromagnetism induced by holes in the film with oxygen vacancy gives a new insight into the behavior of defects in SnO2.