Natural regeneration of abandoned farmland provides an important opportunity to contribute to global reforestation targets, including the Bonn Challenge. Of particular importance are the montane tropics, where a long history of farming, frequently on marginal soils, has rendered many ecosystems highly degraded and hotspots of extinction risk. Ants play crucial roles in ecosystem functioning, and a key question is how time since abandonment and elevation (and inherent temperature gradients therein) affect patterns of ant recovery within secondary forest systems. Focusing on the Colombian Andes across a 1300 m altitudinal gradient and secondary forest (2–30 years) recovering on abandoned cattle pastures, we find that over time ant community composition and species richness recovered towards that of primary forest. However, these relationships are strongly dependent on elevation with the more open and warmer pasturelands supporting more ants than either primary or secondary forest at a particular elevation. The loss of species richness and change in species composition with elevation is less severe in pasture than forests, suggesting that conditions within pasture and its remaining scattered trees, hedgerows and forest fragments, are more favourable for some species, which are likely in or near thermal debt. Promoting and protecting natural regenerating forests over the long term in the montane tropics will likely offer significant potential for returning ant communities towards primary forest levels.