OBJECTIVE To verify the spatial pattern of mortality from breast and cervical cancer in areas of primary health care, considering socioeconomic conditions. METHODS This is an ecological study, from January 2000 to December 2016. The study area is the municipality of São Paulo, Brazil, and its 456 coverage areas of primary health units. Information on deaths of women aged 20 years or over were geocoded according to residence address. We calculated mortality rates, standardized by age, and smoothed by the local empirical Bayesian method, and grouped into three or two years to reduce the random fluctuation of the data. In addition, bivariate global and local Moran indexes were calculated to verify the existence of spatial agglomeration of standardized mortality rates with a domain of socioeconomic condition, elaborated based on the Índice Paulista de Vulnerabilidade Social (IPVS – São Paulo Index of Social Vulnerability). RESULTS The success rate of geocoding was 98.9%. Mortality from breast cancer, without stratification by time, showed a pattern with higher rates located in central regions with better socioeconomic conditions. It showed a decrease at the end of the period and a change in spatial pattern, with increased mortality in peripheral regions. On the other hand, mortality from cervical cancer remained with the highest rates in peripheral regions with worse socioeconomic conditions, despite being reduced over time. CONCLUSION The spatial pattern of mortality from the studied cancers, over time, suggests association with the best socioeconomic conditions of the municipality, either as protection (cervical) or risk (breast). This knowledge may direct resources to prevent and promote health in the territories.