Local governments play a crucial role in the fight for a more sustainable world and, therefore, in achieving the Sustainable Development Goals (SDGs), as they are the closest public entities to citizens and best know their needs. Local governments should be the driving force behind integrating the different areas of sustainability in their municipalities, especially in social services, which is the focus of this paper.However, these governments have limited resources, making it necessary to provide public services as efficiently as possible. To present a complete picture of the factors that affect efficiency in social service provision, we have taken into account the SDGs related to the social sphere of sustainability (SDG 1, SDG 2, SDG 5, and SDG 10), in addition to the determinants usually collected in studies on efficiency in local governments. For a sample of Spanish municipalities, we found that local governments that have made more progress in achieving SDG 2 are more efficient. In contrast, municipalities that have worked the most to reduce gender inequalities (SDG 5) are less efficient in providing social services. The other SDGs do not influence the efficiency analysed.