In this work, the electronic structure and the stability of ferromagnetism of C-doped ZnO are studied by first-principles calculations and Monte Carlo simulation. The calculated results indicate that the ferromagnetic ground state is stabilized by its half-metallic electronic structure which originates from the strong hybridization between Zn-3d and C-2p electrons. Meanwhile, by using the coupling strength obtained from first-principles calculations and Monte Carlo method, the Curie temperatures of ZnO1-xCx (x=555%, 833% and 125%) are predicted to be 210, 260 and 690 K, respectively, which is generally consistent with theroetical and experimental results. The electronic transfer resulting from C doping, and the changes between spin-up and spin-down electron changes for s, p and d electrons of C, Zn, O atom are analyed in detail. The simulated results show that, the local magnetic moments of ZnO1-xCx originate mainly from the hybridization interaction between Zn-3d and C-2p electrons, while the magnetic coupling between the local magnetic moments is preferentially the RKKY coupling.