The microbiome is a key source of antibiotic resistance genes (ARGs), significantly influenced by diet, which highlights the interconnectedness between diet, gut microbiome, and ARGs. Currently, our understanding is limited on the co-occurrence among gut microbiome, antibiotic resistome in the captive giant panda and the perturbation of dietary uptake, especially for the composition and forms in dietary nutrition. Here, a qPCR array with 384 primer sets and 16 S rRNA gene amplicon sequencing were used to characterize the antibiotic resistome and microbiomes in panda feces, dietary bamboo, and soil around the habitat. Diet nutrients containing organic and mineral substances in soluble and insoluble forms were also quantified. Organic and mineral components in water-unextractable fractions were 7.5 to 139 and 637 to 8695 times higher than those in water-extractable portions in bamboo and feces, respectively, while the latter contributed more to the variation (67.5 %) of gut microbiota. Streptococcus, Prevotellaceae, and Bacteroides were the dominant genera in giant pandas. The ARG patterns in panda guts showed higher diversity in old individuals but higher abundance in young ones, driven directly by the bacterial community change and mobile genetic element mediation and indirectly by dietary intervention. Our results suggest that dietary nutrition mainly accounts for the shift of gut microbiota, while bacterial community and mobile genetic elements influenced the variation of gut antibiotic resistome.