The spatial distribution of the COVID‐19 infection rate in the city of Palma (Balearic Islands) is analyzed from the geolocation of positive cases by census tract and its relationship with socioeconomic variables is evaluated. Data on infections have been provided by the Health Service of the Ministry of Health and Consumption of the Government of the Balearic Islands. The study combines several methods of analysis: spatial autocorrelation, calculation of the Gini index and least squares regression, and weighted geographical regression. The results show that the pandemic comprised five waves in the March 2020–March 2022 period, corresponding to the months of April 2020, August 2020, December 2020, July 2021, and January 2022. Each wave shows a particular geographical distribution pattern, however, the second and third waves show higher levels of spatial concentration. In this sense, the second wave, affecting the peripheral neighborhoods of the eastern part of the city. The Gini index confirms geographical imbalances in the distribution of infections in the first waves of the pandemic. In addition, the regression models indicate that the most significant socioeconomic variables in the prediction of COVID‐19 infection are average income, percentage of children under 18 years of age, average size of the household, and percentage of single‐person households. The study shows that economic imbalances in the city have had a clear influence on the spatial pattern of pandemic distribution. It shows the need to implement spatial justice policies in income distribution to balance the effects of the pandemic.