P2X7R is a vital modifier of various inflammatory and immune-related diseases. However, the immunomodulatory effects of P2X7R on corneal allograft rejection remains unknown. Here we showed that P2X7R expression was significantly upregulated in corneal grafts of allogeneic transplant mice. Pharmacological blockage of P2X7R remarkably prolonged graft survival time, and reduced inflammatory cell infiltration in corneal grafts, in particular Th1/Th17 cells. Meanwhile, the frequencies of Th1/Th17 cells in draining lymph nodes were significantly decreased in P2X7R blocked allogeneic mice. Further results showed that the effect of P2X7R on promoting Th1/Th17 mediated immune responses in corneal allograft rejection relied heavily on its activation on the NLRP3/caspase-1/IL-1β axis, while P2X7R blockage could mitigate such activation. Nevertheless, the addition of IL-1β in vivo abrogated the protective effect of P2X7R blockage on promoting corneal graft survival. These findings demonstrate that blockage of P2X7R can substantially alleviate corneal allograft rejection and promote grafts survival, highlighting it as a promising target for preventing or treating corneal allograft rejection.