To elucidate the persistent luminescence mechanism of the Ce3+-Cr3+-codoped Y3Al2Ga3O12 garnet (YAGG), the valence states of Ce and Cr ions before and during UV charging were investigated by X-ray absorption near edge structure (XANES) spectroscopy. In the XANES spectra for Ce LIII and Cr K edges of YAGG:Ce3+-Cr3+ under UV illumination, the valence states of Ce4+ and Cr2+ were detected, but not in the XANES spectra of YAGG:Ce3+ and YAGG:Cr3+. We conclude that the combination of Ce3+ and Cr3+ causes the valence state change into Ce4+ and Cr2+ by UV illumination, which is the mechanism of persistent luminescence.