The effects of companion planting on soil antibiotic resistance genes (ARGs) and associated microbial composition have remained largely unclear until now. In this study, we assessed the changes in the soil microbiome and ARGs frequencies for tomato growing soils that were companion planted with basil (TB) or cilantro (TC) using a metagenome approach. The abundance of the phytopathogen Ralstonia solanacearum was significantly lower in the TC or TB treatments compared to the tomato monoculture soils (TT). A significant enrichment of Pseudomonas and Aquabacterium and a depletion of Nocardioides and Streptomyces were observed in the TC treatment. Interestingly, both TC and TB companion planting reduced the absolute abundance and the number of subtypes of ARGs. The TC soil showed the lowest numbers of unique ARG subtypes, especially the ARGs resistant to vancomycin and rifamycin, as well as those associated with multidrug resistance. Furthermore, network analysis further revealed that Nocardioides and Streptomyces were potential hosts of ARGs, whereas Flavobacterium negatively correlated with mdtG, suggesting a suppressive effect in reducing ARGs. Together, our results suggest that the companion planting of tomatoes with basil or cilantro can reduce the risk of ARG accumulation, making it a feasible farming management tool to promote soil and plant health in sustainable agriculture.