The gut microbiome is linked to osteoporosis. Previous clinical studies showed inconsistent results. This study aimed to characterize the gut microbiota feature and reveal its relation with diet in postmenopausal osteoporosis. Fifty-five postmenopausal women with osteoporosis (Op group) and forty-four age-matched postmenopausal women (normal bone mineral density, Con group) were included in this study. Fecal microbiota was collected and analyzed by shallow shotgun sequencing. Food frequency questionnaires were collected from both groups, and Spearman analysis was used to clarify its correlation with gut microbiota. A total of 2671 species from 29 phyla, 292 families, 152 orders, 80 classes were detected in the study. The two groups had no significant difference in the α and β diversity (p > 0.05). At the genus level, Anaerostipes was enriched in Op group (p < 0.05). At species level, Methanobrevibacter smithii, Bifidobacterium animalis, Rhodococcus defluvii, Lactobacillus plantarum, and Carnobacterium mobile were enriched in the Op group, while Bacillus luciferensis, Acetivibrio cellulolyticus, Citrobacter amalonaticus, and Bifidobacterium breve were differentially enriched in the Con group. Food frequency questionnaire showed that postmenopausal women with osteoporosis intaked more red meat, beer, white and red wine (p < 0.05), and the Con group had more yogurt, fruit, and tea consumption. Red meat consumption had a significant negative correlation with Streptosporangiales (p < 0.01) and Actinomadura (p < 0.05). Fruits intake negatively correlated with Nocardiaceae, Rhodococcus, and Rhodococcus defluvii (p < 0.05). More yogurt intake was consistently correlated with a greater abundance of Streptosporangiales. This study suggests that gut microbiota is significantly altered in the postmenopausal osteoporosis population at genus and species levels, and specific dietary intake might relate to these changes.