Both decreases in compositional similarity with increasing geographic distances between sites (i.e. distance–decay relationship) and vertical stratification of species composition are key issues in ecology. However, the intersection between these two trends has scarcely been investigated. Here we use identical sampling methods in the canopy and at ground level in a tropical rainforest remnant on the coast of the Gulf of Mexico to evaluate, for the first time, a distance–decay relationship within vertical strata in insect assemblages. We found that the ant assemblage was vertically stratified; ant species richness was higher at ground level than in the canopy, and the species composition differed between the two vertical strata. Moreover, we observed that β-diversity increased with geographic distance at ground level, but not in the canopy strata. However, contrary to our prediction, there was less species turnover (lower β-diversity) between vertical strata than between trees. These findings may reflect differences in the dispersal capacity and nest habit of ants from each vertical stratum, and also habitat heterogeneity on the horizontal scale, e.g. the species of sampled trees. Our results illustrate the importance of sampling more than one vertical stratum to understand the spatial distribution patterns of biological diversity in tropical rainforests.