Cities play a critical role in anthropogenic CO2 emissions, which exacerbate climate change and impact urban populations. Urban green infrastructure, such as urban trees, provides essential ecosystem services, including reducing atmospheric CO2 levels. However, there is a significant knowledge gap regarding the impact of urban trees on climate change in semiarid, polluted cities like Tehran, the capital and largest metropolis of the Middle East. This study assesses the carbon sequestration and storage potential of Tehran’s urban infrastructure using the i-Tree Eco model. A randomized cluster sampling method was employed, collecting data on species composition, diameter at breast height (DBH), and total tree height. The results indicate that Tehran’s urban trees sequester approximately 60,102 tons of carbon per year, equivalent to 220,393 tons of CO2. The net carbon storage in urban trees is about 254,579 tons, equivalent to 933,455 tons of CO2. Parks and urban green spaces demonstrate the highest rate of carbon sequestration per hectare, followed by urban services land use. Prioritizing the planting of species with high sequestration rates like Cupressus arizonica (Arizona cypress) and Cupressus sempervirens L. var. horizontalis (Mediterranean cypress) could enhance carbon sequestration efforts in Tehran. These data provide valuable insights into the carbon sequestration potential and environmental impact of different land use types, and may aid in the development of effective environmental policies and land management strategies in semiarid urban areas and other cities in similar settings.