Around the world, urban landscapes are environments modified by man, generally related to low diversity. The efficiency of a biodiversity inventory is linked to the choice of the sampling technique since the taxonomic and ecological responses of the taxons vary between methods. Here we investigate differences in the ant’s composition sampled using three different techniques in two fragments of the urban forest in the Brazilian Amazon. We also assessed whether the different techniques maintained the same ecological responses. We sampled 12 collection points at each fragment, at vegetation, and manual collection and Winkler extractor on the ground. At the same points, soil samples were collected to determine their granulometry, pH, and concentrations of organic matter, sodium, phosphorus, and potassium. We collected 115 taxa and 4720 ants. The Cururu was the richest site with more species in general, as well as in the techniques of manual collection and Winkler. We detected a complementary effect on sampling techniques, which collected different ants’ assemblages. The potassium concentration positively influenced the assemblage’s composition, but its effect varies according to the sampling techniques used. The studied fragments revealed diversity very similar to those registered in continuous Amazonian forests. The use of sampling techniques together improves the representation of the diversity of ants in the studied fragments. Edaphic environmental variables seem to have a predominant effect on ants, affecting their distribution in the landscape even in urban fragments. This highlights the importance of urban forest fragments and their inherent ecological processes.