Few population-based studies have evaluated the influence of long-term diet on the gut microbiome, and data among Asian populations are lacking. We examined the association of long-term diet quality, comprising 8 food groups (fruit, vegetables, dairy, fish/seafood, nuts/legumes, refined grains, red meat, and processed meat), with gut microbiome among Chinese adults. Included were 1920 men and women, enrolled in 2 prospective cohorts (baseline 1996-2006), who remained free of cardiovascular diseases, diabetes, and cancer at stool collection (2015-2018) and had no diarrhea or antibiotic use in the last 7 d before stool collection. Microbiome was profiled by 16S rRNA sequencing. Long-term diet was assessed by repeated surveys at baseline and follow-ups (1996-2011), with intervals of 5.2 to 20.5 y between dietary surveys and stool collection. Associations of dietary variables with microbiome diversity and composition were evaluated by linear or negative binomial hurdle models, adjusting for potential confounders. False discovery rate (FDR) <0.1 was considered significant. The mean±SD age at stool collection was 68±1.5 y. Diet quality was positively associated with microbiome α-diversity (P=0.03) and abundance of Firmicutes, Actinobacteria, Tenericutes, and genera/species within these phyla, including Coprococcus, Faecalibacterium/Faecalibacterium prausnitzii, Bifidobacterium / Bifidobacterium adolescentis, and order RF39 (all FDRs<0.1). Significant associations were also observed for intakes of dairy, fish/seafood, nuts/legumes, refined grains, and processed meat, including a positive association of dairy with Bifidobacterium and inverse associations of processed meat with Roseburia /Roseburia faecis. Most associations were similar, with or without adjustment for BMI and hypertension status or excluding participants with antibiotic use in the past 6 mo. Among apparently healthy Chinese adults, long-term diet quality is positively associated with fecal microbiome diversity and abundance of fiber-fermenting bacteria, although magnitudes are generally small. Future studies are needed to examine if these bacteria may mediate or modify diet-disease relations.