Changes in population structure, abundance, diversity, and distribution in the forest ecosystem are compounded by topographic variation and edaphic factors. The present study aimed to identify the diversity of tree species and their distribution with respect to topographic and edaphic factors. The study was conducted in three community forests (Shorea robusta forest) along the three altitudinal gradients (lower, middle, and higher altitude forests). The study areas recorded 43 tree species under 35 genera and 25 families. Fabaceae had the highest number (n = 7) of tree species, followed by Anacardiaceae and Combretaceae (4 species each). One-way ANOVA showed that there was a high significant difference (P = 0.004) in tree species richness among the altitudinal ranges. However, the value of the Shannon Diversity Index (H) was higher (1.078) in higher altitude forest followed by lower (0.966) and middle altitude (0.833). Tree species were distributed with respect to phosphorus, pH, moisture, bulk density, and altitude. The multiple R square value was determined by multiple linear regression to be 0.446 (p value < 0.001). It is evident that the distribution of tree species is influenced by 44.6% of the total variables. The findings of the present study will be essential for planning and putting the required management strategies into practice since abiotic factors that form a plant’s basic niches and resources affect how well a species can grow and persist.