Background: Although spatial effects contribute to inequalities in health care service utilisation and other health outcomes in low and middle income countries, there have been no attempts to incorporate the impact of neighbourhood effects into equity analyses based on concentration indices. This study aimed to decompose and estimate the contribution of spatial effects on inequalities in uptake of HIV tests in Malawi. Methods: We developed a new method of reflecting spatial effects within the concentration index using a spatial weight matrix. Spatial autocorrelation is presented using a spatial lag model. We use data from the Malawi Demographic Health Survey (n = 24,562) to illustrate the new methodology. Need variables such as 'Any STI last 12 month', 'Genital sore/ulcer', 'Genital discharge' and non need variables such as Education, Literacy, Wealth, Marriage, and education were used in the concentration index. Using our modified concentration index that incorporates spatial effects, we estimate inequalities in uptake of HIV testing amongst both women and men living in Malawi in 2015-2016, controlling for need and non-need variables. Results: For women, inequalities due to need variables were estimated at − 0.001 and − 0.0009 (pro-poor) using the probit and new spatial probit estimators, respectively, whereas inequalities due to non-need variables were estimated at 0.01 and 0.0068 (pro-rich) using the probit and new spatial probit estimators. The results suggest that spatial effects increase estimated inequalities in HIV uptake amongst women. Horizontal inequity was almost identical (0.0103 vs 0.0102) after applying the spatial lag model. For men, inequalities due to need variables were estimated at − 0.0002 using both the probit and new spatial probit estimators; however, inequalities due to non-need variables were estimated at − 0.006 and − 0.0074 for the probit and new spatial probit models. Horizontal inequity was the same for both models (− 0.0057). Conclusion: Our findings suggest that men from lower socioeconomic groups are more likely to receive an HIV test after adjustment for spatial effects. This study develops a novel methodological approach that incorporates estimation of spatial effects into a common approach to equity analysis. We find that a significant component of inequalities in HIV uptake in Malawi driven by non-need factors can be explained by spatial effects. When the spatial model was applied, the inequality due to non need in Lilongwe for men and horizontal inequity in Salima for women changed the sign. This approach can be used to explore inequalities in other contexts and settings to better understand the impact of spatial effects on health service use or other health outcomes, impacting on recommendations for service delivery.