In this work, the effects of cerium doping and oxygen defects of ferroelectric Hf0.5Zr0.5O2 (HZO) are systematically studied by first-principles calculations. According to the results, the combined effect of Ce atoms and oxygen vacancy has a significant effect on the improvement of the orthorhombic phase fraction in HZO, and the mechanism of this phenomenon is also studied. The optimal concentration of Ce doping is 9.375 formula unit%, and the optimal concentration of oxygen vacancy is 9.375 formula unit%. The interaction between Ce doping and oxygen defects is also discussed from the perspective of structural stability and electrical balance. These findings are helpful for the preparation of Ce-doped HZO ferroelectric thin films and provide experience for the study of other dopants.