Tropical agroforestry systems have immense potential to sequester carbon both in aboveground and belowground biomass and soil. Homegarden agroforestry is a popular land-use system in the tropics, sequestrating more organic carbon in soil than crops, monoculture plantations and even than other agroforestry systems. Tree diversity and density are reported to affect soil organic carbon content in many of tropical agroforestry systems. Little evidence, however, exists for tropical homegardens. The present study has been conducted to investigate soil organic carbon content in relation to tree species diversity in the homegarden agroforestry system of north-eastern Bangladesh, to test the hypothesis that homegardens with high species diversity contain more organic carbon in soil than those with low species diversity. A multistage random sample of homegardens was selected and observations made in sample plots of tree density, species richness, soil pH and soil organic carbon content. Soil samples were collected at two depths (0–25, 26–50 cm) from each plot. Soil organic carbon content was found to be positively correlated with both tree density (r = 0.93, p < 0.01) and species richness (r = 0.79, p < 0.01). Soil pH was not found to differ significantly across soil depth (p = 0.67), except that more organic carbon content was found in the deeper soil layer than the upper layer (p < 0.05). The study demonstrates that species-rich homegarden with high tree density can sequester more carbon in soil than species-poor homegardens and thereby contribute more to climate change mitigation.