Autoimmune diseases occur when the immune system attacks and destroys the organs and tissues of its own host. Autoimmunity is the third most common type of disease in the United States. Because there is no cure for autoimmunity, it is extremely important to study the mechanisms that trigger these diseases. Most autoimmune diseases predominantly affect females, indicating a strong sex bias. Various factors, including sex hormones, the presence or absence of a second X chromosome, and sex-specific gut microbiota can influence gene expression in a sex-specific way. These changes in gene expression may, in turn, lead to susceptibility or protection from autoimmunity, creating a sex bias for autoimmune diseases. In this Review we discuss recent findings in the field of sex-dependent regulation of gene expression and autoimmunity.