Based on first-principles calculations, the coexistence of Ti vacancies (VTi) and O vacancies (VO) is first considered to study the origin of the ferromagnetic ordering in undoped rutile TiO2. The calculations show that VO can induce local magnetic moments in TiO2, however, the ferromagnetic (FM) exchange interaction of two VO is not strong enough to induce room-temperature (RT) ferromagnetism on their own in undoped TiO2. The FM coupling between two VTi is about four times stronger than that between two VO. More importantly, the FM coupling between two VTi is further enhanced after VO is introduced. Our results indicate that the electrons induced by VO mediate the long-range FM exchange interaction between two distant VTi. This maybe the ferromagnetism mechanism in undoped TiO2: VTi produce local moments while the electrons induced by VO mediated the long-range FM exchange interaction. The results are in excellent agreement with the experimental evidences that VO alone cannot induce RT ferromagnetism while VO can promote the ferromagnetic ordering in undoped TiO2.