The need for environmental sustainability is paramount as it forms the basis of all sustainable development efforts. Public libraries have both the potential and the responsibility to contribute to achieving the Agenda 2030 goals and fostering an environmentally sustainable society. This study seeks to expand knowledge about how public libraries in Sweden engage with environmental sustainability and to explore how this aligns with their broader societal role. Empirical data was gathered through a questionnaire survey distributed to public libraries across all Swedish municipalities. The findings were analyzed within a theoretical framework that combines two perspectives: the role of public libraries in environmental education and leadership, and their institutional identity and legitimacy within society. The empirical data shows that public libraries work with environmental sustainability can be developed. Environmental sustainability is seen as an inherent part of public libraries' identity. The development of this identity is hindered by low expectations among library users and politicians for public libraries to have a societal role as an environmental educator and leader.