Autoimmune liver diseases predominantly affect women. In this study, we aimed to elucidate how sex affects autoimmune hepatic inflammation. Acute experimental cholangitis was induced by adoptive transfer of OVA-specific CD8+ T cells into mice, which express the cognate Ag on cholangiocytes. In contrast to previous mouse models of cholangitis, this model displayed a strong sexual dimorphism: female mice developed marked cholangitis, whereas male mice were resistant to cholangitis induction. The recruitment of endogenous CD4+ T cells, but not transferred CD8+ T cells into female livers was strongly increased. These cells expressed higher amounts of the proinflammatory cytokine IL-17, which was at least in part responsible for the liver inflammation observed. The recruitment of endogenous CD4+ T cells was associated with increased expression of the chemokines CXCL-9 and CXCL-10 in female livers. The sex-specific factor responsible for the observed differences was found to be testosterone: male mice could be rendered susceptible to liver inflammation by castration, and testosterone treatment was sufficient to completely suppress liver inflammation in female mice. Accordingly, testosterone treatment of female mice significantly reduced the expression of IL-17A, CXCL-9, and CXCL-10 within the liver. Serum testosterone levels of untreated mice negatively correlated with the IL-17, CXCL-9, and CXCL-10 expression in the liver, further supporting a role for testosterone in hepatic immune homeostasis. In conclusion, testosterone was found to be the major determinant of the observed sexual dimorphism. Further study into the role of testosterone for liver inflammation could lead to novel treatment targets in human autoimmune liver diseases.