The annealing effects on structure and magnetism for Co-doped ZnO films under air, Ar, and Ar/H2 atmospheres at 250 °C have been systematically investigated. Room-temperature ferromagnetism has been observed for the as-deposited and annealed films. However, the saturation magnetization (Ms) varied drastically for different annealing processes with Ms∼0.5, 0.2, 0.9, and 1.5 μB/Co for the as-deposited, air-annealed, Ar-annealed, and Ar/H2-annealed films, respectively. The x-ray absorption spectra indicate all these samples show good diluted magnetic semiconductor structures. By comparison of the x-ray near edge spectra with the simulation on Zn K edge, an additional preedge peak appears due likely to the formation of oxygen vacancies. The results show that enhancement (suppression) of ferromagnetism is strongly correlated with the increase (decrease) of oxygen vacancies in ZnO. The upper limit of the oxygen vacancy density of the Ar/H2-annealed film can be estimated by simulation to be about 1×1021 cm-3.