Both sequence variation and copy-number variation (CNV) of the genes encoding receptors for immunoglobulin G (Fcg receptors) have been genetically and functionally associated with a number of autoimmune diseases. However, the molecular nature and evolutionary context of this variation is unknown. Here, we describe the structure of the CNV, estimate its mutation rate and diversity, and place it in the context of the known functional alloantigen variation of these genes. Deletion of Fcg receptor IIIB, associated with systemic lupus erythematosus, is a result of independent nonallelic homologous recombination events with a frequency of approximately 0.1%. We also show that pathogen diversity, in particular helminth diversity, has played a critical role in shaping the functional variation at these genes both between mammalian species and between human populations. Positively selected amino acids are involved in the interaction with IgG and include some amino acids that are known polymorphic alloantigens in humans. This supports a genetic contribution to the hygiene hypothesis, which states that past evolution in the context of helminth diversity has left humans with an array of susceptibility alleles for autoimmune disease in the context of a helminth-free environment. This approach shows the link between pathogens and autoimmune disease at the genetic level and provides a strategy for interrogating the genetic variation underlying autoimmunedisease risk and infectious-disease susceptibility.