Forests face a variety of threats in the modern era. Agroforestry systems, both traditional and introduced, have a tremendous capacity for providing sustainable resources and combating the impact of global climate change. Indigenous agroforestry and forest land-use systems are important reservoirs for biodiversity conservation and ecosystem services, providing a potential contribution to livelihood security for rural communities. This study aimed to assess the tree diversity and carbon stock of agroforestry and adjoining forests along altitudinal gradients, ranging between 700 and 2200 masl (i.e., lower, middle, and upper altitudes) by laying sample plots randomly of a size of 20 × 20 m2. In the forest land-use system, the maximum Importance Value Index (IVI) included Dalbergia sissoo (71.10), Pyrus pashia (76.78), and Pinus roxburghii (79.69) at the upper, middle, and lower elevations, respectively, whereas, in the agroforestry land-use system, the IVI reported for Ficus semicordata was 43.05 at the upper, while for Grewia optiva it was at 53.82 at the middle and 59.33 at the lower altitudes. The below-ground biomass density (AGBD) was recorded as 1023.48 t ha−1 (lower), 242.92 t ha−1 (middle), and 1099.35 t ha−1(upper), while in the agroforestry land-use system, the AGBD was 353.48 t ha−1 (lower), 404.32 t ha−1 (middle), and 373.23 t ha−1 (upper). The total carbon density (TCD) values recorded were 630.57, 167.32, and 784.00 t ha−1 in forest land-use systems, and 227.46, 343.23, and 252.47 in agroforestry land-use systems for lower, middle, and upper altitudes, respectively. The Margalef’s Index values for agroforestry and forests ranged from 2.39 to 2.85 and 1.12 to 1.30, respectively. Soil organic carbon (SOC) stock recorded 45.32, 58.92, and 51.13 Mg C ha−1 for agroforestry and 61.73, 42.65, and 71.08 Mg C ha−1 for forest in lower, middle and upper elevations, respectively. The study suggests that selecting land use patterns can be an effective management system for tree species at different elevations for carbon storage, helping to mitigate climate change and aiding in sustainable management of ecosystems in the Garhwal Himalayas.