Observational studies have suggested that herpes virus infections increase the risk of allograft dysfunction after tissue and organ transplantation, but it is still unclear whether this association is causal. The aim of this study was to assess the causal relationship between four herpes virus infections and allograft dysfunction. We used two-sample bidirectional Mendelian randomization (MR) to investigate the causality between four herpes virus infections - cytomegalovirus (CMV), Epstein-Barr virus (EBV), herpes simplex virus (HSV) and varicella zoster virus (VZV) - and allograft dysfunction after tissue and organ transplantation. Based on summary data extracted from genome-wide association studies (GWAS), we chose eligible single nucleotide polymorphisms (SNPs) as instrumental variables. The Inverse variance weighted (IVW) method was used as the main analysis method, supplemented by Weighted median and MR-Egger analyses. The MR-PRESSO test, MR-Egger intercept test, heterogeneity test, leave-one-out analysis and funnel plot were used to analyze the sensitivity of MR results. We found EBV early antigen-D (EA-D) antibody levels and shingles were the only two variables associated with an increased risk of allograft dysfunction. No evidence of allograft dysfunction increasing the risk of the four herpes virus infections was observed. Sensitivity analyses confirmed the robustness of our results. Our results suggest that EBV and VZV are involved in graft rejection or dysfunction. However, the relationship between CMV and HSV infections and allograft dysfunction remains unclear and requires further clarification.