Forest ecosystems are critical to global biogeochemical cycles but under pressure from harvesting and climate change. We investigated the effects of organic matter (OM) removal during forest harvesting on the genetic potential of soil communities for biomass decomposition and nitrogen cycling in five ecozones across North America. We analyzed 107 samples, representing four treatments with varied levels of OM removal, at Long-Term Soil Productivity Study sites. Samples were collected more than ten years after harvesting and replanting and were analyzed via shotgun metagenomics. High-quality short reads totaling 1.2 Tbp were compared to the Carbohydrate Active Enzyme (CAZy) database and a custom database of nitrogen cycle genes. Gene profile variation was mostly explained by ecozone and soil layer. Eleven CAZy and nine nitrogen cycle gene families were associated with particular soil layers across all ecozones. Treatment effects on gene profiles were mainly due to harvesting, and only rarely to the extent of OM removal. Harvesting generally decreased the relative abundance of CAZy genes while increasing that of nitrogen cycle genes, although these effects varied among ecozones. Our results suggest that ecozone-specific nutrient availability modulates the sensitivity of the carbon and nitrogen cycles to harvesting with possible consequences for long-term forest sustainability.