Brazil is in the 19th position of priority countries for the control of TB/HIV coinfection, so we aimed to analyze the social and health services contexts that are associated with TB/HIV coinfection in São Paulo state. Ecological study conducted in 645 cities of the state. The study population consisted of 10,389 new cases of TB/HIV coinfection in state residents between 2010 and 2015. The variables and indicators used in the study were collected from secondary sources. To identify the factors associated with the occurrence of TB/HIV coinfection cases, generalized additive models for location, scale and shape were used. The best distribution model was defined from the lowest Akaike information criterion value. There was an association between the occurrence of coinfection and the diagnosis of TB after death and greater treatment default. There was also an association with greater coverage of nurses and Family Health Strategy, which comprises Primary Care settings focused on families. Regarding the social context, the Gini Coefficient of inequality was identified as a determinant of coinfection. The study presents the complexity of TB/HIV coinfection, proposing critical points in the health services and social context. Despite the high coverage of nurses and Family Health Strategy in some cities, this did not affect the reduction of the incidence of coinfection. These findings may be attributed to a fragmented care and focused on acute conditions. Furthermore, this model of care holds few prospects for care integration or prioritization of prevention and health promotion actions.