Soil salinization and heavy metal (HM) contamination are major challenges facing agricultural systems worldwide. Determining how soil microbial communities respond to these stress factors and identifying individual phylotypes with potential to tolerate these conditions while promoting plant growth could help prevent negative impacts on crop productivity. This study used amplicon sequencing and several bioinformatic programs to characterize differences in the composition and potential functional capabilities of soil bacterial, fungal, and archaeal communities in five agricultural fields that varied in salinity and HM concentrations within the Indus basin region of Pakistan. The composition of bacteria with the potential to fix atmospheric nitrogen (N) and produce the enzyme 1-aminocyclopropane-1-carboxylic acid (ACC) deaminase were also determined. Microbial communities were dominated by: Euryarchaeota (archaea), Actinobacteria, Proteobacteria, Planctomycetota, Firimicutes, Patescibacteria and Acidobacteria (bacteria), and Ascomycota (fungi), and all soils contained phylotypes capable of N-fixation and ACC-deaminase production. Salinity influenced bacterial, but not archaeal or fungal communities. Both salinity and HM altered the relative abundance of many phylotypes that could potentially promote or harm plant growth. These stress factors also appeared to influence the potential functional capabilities of the microbial communities, especially in their capacity to cycle phosphorous, produce siderophores, and act as symbiotrophs or pathotrophs. Results of this study confirm that farms in this region are at risk due to salinization and excessive levels of some toxic heavy metals, which could negatively impact crop and human health. Changes in soil microbial communities and their potential functional capabilities are also likely to affect several critical agroecosystem services related to nutrient cycling, pathogen suppression, and plant stress tolerance. Many potentially beneficial phylotypes were identified that appear to be salt and HM tolerant and could possibly be exploited to promote these services within this agroecosystem. Future efforts to isolate these phylotypes and determine whether they can indeed promote plant growth and/or carry out other important soil processes are recommended. At the same time, identifying ways to promote the abundance of these unique phylotypes either through modifying soil and crop management practices, or developing and applying them as inoculants, would be helpful for improving crop productivity in this region.