Cu-doped anatase TiO2 films grown by magnetron sputtering at room temperature showed the unexpected observation of room-temperature ferromagnetism, which was enhanced or destroyed corresponding to low or high impurity concentration via vacuum annealing. On the basis of the analysis of composition and structure, the most important factor for activating ferromagnetism can be identified as the creation of grain boundary defects. In addition, oxygen defects can be the dominating factor for increasing the saturation moment of the 0.19 at. % Cu-doped TiO2 film from 0.564 to 26.41 emu/cm(3). These results help elucidate the origin of ferromagnetism and emphasize the role of oxygen defects for the application of ferromagnetic films.