Vegetables capture antibiotic resistance genes (ARGs) from the soil and then pass them on to consumers through the delivery chain and food chain, and are therefore the key node that may increase the risk of human exposure to ARGs. This study investigates the patterns and driving forces behind the transmission of ARGs from soil to vegetables by the commonly planted cash crops in the coastal region of southern China, i.e. broccoli, pumpkin, and broad bean, to investigate. The study used metagenomic data to reveal the microbial and ARGs profiles of various vegetables and the soil they are grown. The results indicate significant differences in the accumulation of ARGs among different vegetables harvested in the same area at the same time frame, and the ARGs accumulation ability of the three vegetables was in the order of broccoli, broad bean, and pumpkin. In addition, broccoli collected the highest number of ARGs in types (n = 14), while pumpkin (n = 13) does not obtain trimethoprim resistance genes and broad beans (n = 10) do not obtain chloramphenicol, fosmidomycin, quinolone, rifamycin, or trimethoprim resistance genes. Host tracking analysis shows a strong positive correlation (|rho| > 0.8, p < 0.05) between enriched ARGs and plant companion microbes. Enrichment analysis of metabolic pathways of companion microbes shows that vegetables exhibit a discernible enrichment of companion microbes, with significant differences among vegetables. This phenomenon is primarily due to the screening of carbohydrate metabolism capabilities among companion microbes and leads varied patterns of ARGs that spread from the soil to vegetables. This offers a novel insight into the intervention of foodborne transmission of ARGs.