Soil ecosystems are home to a diverse range of microorganisms, but they are only partially understood because no single-cell sequencing or whole-community sequencing provides a complete picture of these complex communities. Using one of such metagenomics approaches, we succeeded in monitoring the microbial diversity and stress-response gene in the soil samples. This study aims to test whether known differences in taxonomic diversity and composition are reflected in functional gene profiles by implementing whole gene sequencing (WGS) metagenomic analysis of geographically dispersed soils from two distinct pristine forests. The study was commenced by sequencing three rainforest soil samples and three peat swamp soil samples. Soil richness effects were assessed by exploring the changes in specific functional gene abundances to elucidate physiological constraints acting on different soil systems and identify variance in functional pathways relevant to soil biogeochemical cycling. Proteobacteria shows abundances of microbial diversity for 52.15% in Royal Belum Reserved Forest and 48.28% in Raja Musa; 177 out of 1,391,841 and 449 out of 3,586,577 protein coding represent acidic stress-response genes for Royal Belum and Raja Musa, respectively. Raja Musa indicates pH 2.5, which is extremely acidic. The analysis of the taxonomic community showed that Royal Belum soils are dominated by bacteria (98% in Sungai Kooi (SK), 98% in Sungai Papan (SP), and 98% in Sungai Ruok (SR), Archaea (0.9% in SK, 0.9% in SP, and 1% in SR), and the remaining were classed under Eukaryota and viruses. Likewise, the soils of Raja Muda Musa are also dominated by bacteria (95% in Raja Musa 1 (RM1), 98% in Raja Musa 2 (RM2), and 96% in Raja Musa 3 (RM3)), followed by Archaea (4% in RM1, 1% in RM2, and 3% in RM3), and the remaining were classed under Eukaryota and viruses. This study revealed that RBFR (Royal Belum Foresr Reserve) and RMFR (Raja Musa Forest Reserve) metagenomes contained abundant stress-related genes assigned to various stress-response pathways, many of which did not show any difference among samples from both sites. Our findings indicate that the structure and functional potential of the microbial community will be altered by future environmental potential as the first glimpse of both the taxonomic and functional composition of soil microbial communities.