This study estimates the carbon emissions of Pingliang City, a resource-based city in less developed areas of China, from 2010 to 2020, based on nighttime light data and county-level carbon emission data from the CEADs database. By employing visualization methods such as standard deviation ellipses and exploratory spatial analysis, the spatiotemporal evolution and spatial agglomeration characteristics of carbon emissions in Pingliang City are depicted. The results indicate: (1) From 2010 to 2020, the total carbon emissions in Pingliang City exhibited a phased characteristic of initial increase, followed by a period of stability, and then a further increase; spatially, the central counties of Pingliang City had higher carbon emissions, mainly around Liuhu Town and Baimiao Township in Kongtong District. (2) The distribution center of carbon emissions had gradually shifted towards the northwest, indicating that the carbon emissions in the northwest of the research area had increased more significantly than those in other regions; moreover, carbon emissions initially diverged and then agglomerated in the "southeast-northwest"direction, and initially agglomerated and then diverged in the"northeast-southwest"direction, with the overall direction of emission divergence or agglomeration being relatively stable. (3) Carbon emissions performed a positive spatial autocorrelation, manifesting as an agglomeration effect, and overall presented a distribution characteristic of"single core-multiple scatter points,"with the degree of carbon emission agglomeration in each county having increased to some extent during the period under review.