Acute rejection is the main contributor to early allograft failure. Current immunosuppressive regimens have shortcomings, such as toxicity and minimal inhibitory effects on B cells. Hence, developing novel, effective, and selective anti-acute rejection drugs is crucial. Therefore, this study aimed to investigate the inhibitory effect of ritlecitinib (PF-06651600), a new janus kinase 3 inhibitor, on T and B cells, as well its preventive effects on acute allograft rejection. A murine cardiac transplantation model coupled with cell culture- and immunohistochemistry-based techniques was used. In vitro assays demonstrated that ritlecitinib inhibits naïve CD4+ T cell differentiation into T helper (Th)1 and Th17 cells, reduces relative inflammatory cytokines, and suppresses CD4+ and CD8+ T cell proliferation. Furthermore, ritlecitinib inhibited B cell activation and differentiation and antibody production. In vivo experiments revealed that ritlecitinib significantly prolongs allograft survival, decreases serum donor-specific antibody immunoglobulin G levels, alleviats allograft damage, and reduces C4d deposition and T, B, and plasma cell infiltration in allografts. Moreover, B and plasma cell percentages and counts were significantly decreased in recipient spleen, lymph nodes, bone marrow, and blood. Overall, ritlecitinib prevented acute rejection in cardiac transplantation by inhibiting T and B cells, suggesting its potential as a novel clinical immunosuppressant.