The X chromosome and X-linked variants have largely been ignored in genome-wide and candidate association studies of infectious diseases due to the complexity of statistical analysis of the X chromosome. This exclusion is significant, since the X chromosome contains a high density of immune-related genes and regulatory elements that are extensively involved in both the innate and adaptive immune responses. Many diseases present with a clear sex bias, and apart from the influence of sex hormones and socioeconomic and behavioural factors, the X chromosome, X-linked genes and X chromosome inactivation mechanisms contribute to this difference. Females are functional mosaics for X-linked genes due to X chromosome inactivation and this, combined with other X chromosome inactivation mechanisms such as genes that escape silencing and skewed inactivation, could contribute to an immunological advantage for females in many infections. In this review, we discuss the involvement of the X chromosome and X inactivation in immunity and address its role in sexual dimorphism of infectious diseases using tuberculosis susceptibility as an example, in which male sex bias is clear, yet not fully explored.