Here, we have discovered a X-ray excited long afterglow phosphor β-NaYF4: Tb3+. After the irradiation of X-ray, the green emission can persist for more than 240 h. After 36 h, the afterglow intensity arrived at 0.69 mcd•m-2, which can clearly be observed by naked eyes. Even after 84 h, the afterglow emission brightness still reached 0.087 mcd•m-2. Also, combined with the results of thermoluminescence and photoluminescence, the super long afterglow emission of β-NaYF4: Tb3+ can be ascribed to the tunneling model associated with F centers. More importantly, the super long green afterglow emission of β-NaYF4: Tb3+ has been successfully used as in vivo light source to activate g-C3N4 for photodynamic therapy(PDT)and bacteria destruction. Furthermore, super long persistent luminescence of β-NaYF4: Tb3+ could be repeatedly charged by X-ray for many circulations, which indicates that the phosphors have high photo stability under repeated cycles of alternating X-ray irradiation.