PurposeTo determine the effects of anti-B cell surface marker CD20 antibody on the occurrence and progression of endometrial cancer to provide insights into clinical treatment in the future.MethodsWe performed a two-sample Mendelian randomization analysis (MR) to analyze the causal relationship between EC and immune cell markers. The genome-wide association study (GWAS) data of MS4A1 single nucleotide polymorphism encoding gene of CD20 were collected, and a drug target MR analysis was performed to detect the causal relationship between anti-CD20 antibody and the risk of EC. The risk of follicular lymphoma was used as a positive control, and EC was used as the outcome.ResultsEC exerted an effect on 28 immunophenotypes, predominantly on CD20. CD20 in immunoglobulin D+ CD38− B cells, memory B cells, and unsw memory B cells increased after EC onset. In addition, we detected one immunophenotype that exerted a dangerous effect on EC, i.e., CD3/TD CD4+ (mature stage of the T cell group). Simultaneously, CD20 could be used as both a risk factor and a protective factor for EC (P > 0.05). Anti-CD20 antibodies significantly reduced the risk of follicular lymphoma, including two GWAS pooled datasets. In addition, anti-CD20 antibodies exerted a protective effect on EC in two GWAS pooled datasets (P > 0.05).ConclusionOur study confirms the close relationship between CD20 and EC. Anti-CD20 antibodies may exert a protective effect on EC and reduce the risk of EC morbidity, providing a reference for future clinical diagnosis and treatment. However, further clinical verification of our results is warranted.