From an institutional prospective cohort for encephalitis, we identified patients with autoimmune encephalitis after the use of atezolizumab, a PD‐L1 (programmed death‐ligand 1) inhibitor, from August 2016 to September 2019 and analyzed their HLA genotypes. This evidence concerns the gene CD274 and viral encephalitis.