Single nucleotide polymorphisms (SNP) in various genes have been described to be associated with susceptibility to autoimmune disease. In this study, myalgic encephalomyelitis/chronic fatigue syndrome (ME/CFS) patients and controls were genotyped for five immune gene SNPs in tyrosine phosphatase non-receptor type 22 (PTPN22, rs2476601), cytotoxic T-lymphocyte-associated protein 4 (CTLA4, rs3087243), tumor necrosis factor (TNF, rs1800629 and rs1799724), and interferon regulatory factor 5 (IRF5, rs3807306), which are among the most important risk variants for autoimmune diseases. Analysis of 305 ME/CFS patients and 201 healthy controls showed significant associations of the PTPN22 rs2476601 and CTLA4 rs3087243 autoimmunity-risk alleles with ME/CFS. The associations were only found in ME/CFS patients, who reported an acute onset of disease with an infection (PTPN22 rs2476601: OR 1.63, CI 1.04-2.55, p = 0.016; CTLA4 rs3087243: OR 1.53, CI 1.17-2.03, p = 0.001), but not in ME/CFS patients without infection-triggered onset (PTPN22 rs2476601: OR 1.09, CI 0.56-2.14, p = 0.398; CTLA4 rs3087243: OR 0.89, CI 0.61-1.30, p = 0.268). This finding provides evidence that autoimmunity might play a role in ME/CFS with an infection-triggered onset. Both genes play a key role in regulating B and T cell activation.