Habitat loss affects the nature of biotic interactions in all ecosystems and at all levels of the food web. Nevertheless, little attention has been given to soil nematodes in tropical habitats despite their important role in ecosystem functioning worldwide. Here, we analyzed the influence of anthropogenic habitat disturbance on the absolute and relative density and composition (i.e., trophic guilds) of soil nematode communities associated with the rhizosphere of the tropical herb Heliconia collinsiana in continuous mature forests and human-induced secondary forests. We compared nematode densities based on the following feeding guilds: bacterivores, fungivores, herbivores and predators. Thereafter, we classified herbivorous nematodes into genera and described soil properties in both habitat types including pH, electrical conductivity, and organic matter content. Herbivores were significantly the most abundant feeding guild for both habitats represented by Criconemella spp., Helicotylenchus spp., and Meloidogyne spp., which showed no significant differences in density between habitats. Relative but not absolute nematode density differed between habitats, with fungivore nematodes being significantly lower in secondary forests. No significant differences in soil properties were detected. Overall, our results suggest that forest disturbance affects the nematode community associated with the rhizosphere of H. collinsiana which may affect forest succession and the dynamics of the soil biota. Our study contributes to the understanding of biotic interactions in conserved and disturbed tropical habitats.