Ceria(CeO2) nanocubes were synthesized by a hydrothermal method and weak ferromagnetism was observed in room temperature. After ultraviolet irradiation, the saturation magnetization was significantly enhanced from*3.18×10-3 to *1.89×10-2 emug-1. This is due to the increase of oxygen vacancies in CeO2 structure which was confirmed by X-ray photoelectron spectra. The first-principle calculation with Vienna ab-initio simulation package was used to illustrate the enhanced ferromagnetism mechanism after calculating the density of states(DOSs) and partial density of states(PDOSs) of CeO2 without and with different oxygen vacancies. It was found that the increase of oxygen vacancies will enlarge the PDOSs of Ce 4f orbital and DOSs. Two electrons in one oxygen vacancy are respectively excited to 4f orbital of two Ce atoms neighboring the vacancy, making these electron spin directions on 4f orbitals of these two Ce atoms parallel. This superexchange interaction leads to the formation of ferromagnetism in CeO2 at room temperature. Our work indicates that ultraviolet irradiation is an effective method to enhance the magnetism of CeO2 nanocube, and the firstprinciple calculation can understand well the enhanced magnetism.