Land use change in the Amazon rainforest alters the taxonomic structure of soil microbial communities, but whether it alters their functional gene composition is unknown. We used the highly parallel microarray technology GeoChip 4.0, which contains 83 992 probes specific for genes linked nutrient cycling and other processes, to evaluate how the diversity, abundance and similarity of the targeted genes responded to forest-to-pasture conversion. We also evaluated whether these parameters were reestablished with secondary forest growth. A spatially nested scheme was employed to sample a primary forest, two pastures (6 and 38 years old) and a secondary forest. Both pastures had significantly lower microbial functional genes richness and diversity when compared to the primary forest. Gene composition and turnover were also significantly modified with land use change. Edaphic traits associated with soil acidity, iron availability, soil texture and organic matter concentration were correlated with these gene changes. Although primary and secondary forests showed similar functional gene richness and diversity, there were differences in gene composition and turnover, suggesting that community recovery was not complete in the secondary forest. Gene association analysis revealed that response to ecosystem conversion varied significantly across functional gene groups, with genes linked to carbon and nitrogen cycling mostly altered. This study indicates that diversity and abundance of numerous environmentally important genes respond to forest-to-pasture conversion and hence have the potential to affect the related processes at an ecosystem scale. © 2014 John Wiley & Sons Ltd.