The ZnO nanorod array films have been epitaxially deposited on indium tin oxide (ITO) glass along 0001 direction. It is found that the film is grown in a two-step process including nanoparticle film nucleation and oriented rod growth. The as-prepared ZnO film shows a dominant diamagnetic signal and a weak ferromagnetic signal at room temperature. The room temperature ferromagnetism deteriorated by annealing in air or N2. The photoluminescent spectra revealed that the intensity of ZnO defect band decreases after annealing. Thus, the decreased ferromagnetism is likely to have resulted from the decrease of oxygen vacancies and defects in the as-prepared film. Moreover, ZnO deposited at various times showed that defects located at or near the interface between the substrate and the film play a major role in ferromagnetism. It suggests that ferromagnetism can be tuned by changing the defects in ZnO.