Increased risk of tuberculosis is widely recognized to be associated with increased poverty, yet there have been few analyses of the social determinants of tuberculosis, particularly in high-burden settings. We conducted a multilevel analysis of self-reported tuberculosis disease in a nationally representative sample of South Africans based on the 1998 Demographic and Health Survey (DHS). Individual and household-level demographic, behavioral and socioeconomic risk factors were taken from the DHS; data on community-level socioeconomic status (including measures of absolute wealth and income inequality) were derived from the 1996 national census. Of the 13,043 DHS respondents, 0.5% reported having been diagnosed with tuberculosis disease in the past 12 months and 2.8% reported having been diagnosed with tuberculosis disease in their lifetime. In a multivariate model adjusting for demographic and behavioral risk factors, tuberculosis diagnosis was associated with cigarette smoking, alcohol consumption and low body mass index, as well as a lower level of personal education, unemployment and lower household wealth. In a model including individual- and household-level risk factors, high levels of community income inequality were independently associated with increased prevalence of tuberculosis (adjusted odds ratio for lifetime tuberculosis comparing the most unequal quintile to the middle quintile of inequality: 2.37, 95% confidence interval: 1.59-3.53). These results provide novel insights into the socioeconomic determinants of tuberculosis in developing country settings, although the mechanisms through which income inequality may affect tuberculosis disease require further investigation.