We examined the effect of selective logging and corresponding forest canopy loss on arboreal ant diversity in a tropical rainforest. Arboreal ants were collected from an unlogged forest plot and from forest plots selectively logged 14 years and 24 years earlier in Danum Valley, Sabah, Malaysia, using a canopy fogging method. Selective logging was associated with a significant decrease in canopy cover and an increase in understory vegetation density relative to unlogged forest. Our study showed that selective logging in primary forest might not dramatically decrease total species number and overall abundance of arboreal ants; however, it may influence the species composition and dominance structure of the ant community, accompanied by an increase in abundance of shrub-layer species and trophobiotic species. In view of the results of this study, management techniques that minimize logging impact on understory vegetation structure are likely to help maintain the conservation value of logged forests for arboreal ants. Our results also suggest that accurate assessment of the impacts on biodiversity should not be based only on measurement of species number and overall abundance, but also on analysis of species composition and community structure.