After Bonferroni correction, HLA‐B*27:05 was significantly associated with autoimmune encephalitis by atezolizumab (corrected P < 0.001, odds ratio 59, 95% CI = 9.0 ~ 386.9). Here, HLA-B is linked to autoimmune encephalitis.