Antibiotic resistance genes (ARGs) are emerging environmental pollutants, and the effect of both abiotic (e.g., anthropogenic pollutants such as sulfonamides (SAs)) and biotic (e.g., microbial community (taxonomy), mobile genetic elements (MGEs)) factors on the antibiotic resistome (collection of ARGs) has received much attention recently. In addition, function (e.g., CAZy, eggNOG and KEGG) is also an important biotic factor; however, how function correlates to ARGs and thus contributes to the antibiotic resistome remains ambiguous. This work explores the effect of sulfonamides (SAs) on ARGs and MGEs by a metagenomic analysis, a principal component analysis (PCA), and a nonmetric multidimensional scaling analysis (NMDS). Then, the work establishes a correlation between ARGs and function with a co-occurrence network and reveals the contribution and positive (negative)/direct (indirect) effect of taxonomy, MGEs, and function to the antibiotic resistome by variation partitioning analysis (VPA) and partial least-squares-path modeling (PLS-PM). The results show that the soil has diverse ARGs and several MGEs and SAs impose significant effects on them. Further, CAZy, eggNOG, and KEGG (including pathway and orthology) show strong and significant correlation with ARGs on the basis of the co-occurrence network; however, in our system it seems that only the KEGG pathway promotes the interpretation of ARGs and should be regarded as the priority function on considering the role of function in structuring the antibiotic resistome. This work reveals the importance and necessity of function as a biotic factor in shaping the antibiotic resistome in diverse resistome-related fields.