Polycystic ovary syndrome (PCOS) is a chronic endocrine and metabolic disease. Gut microbiota is closely related to many chronic diseases. In this study, we conducted a cross-sectional study and recruited 30 obese (OG) and 30 non-obese (NG) women with PCOS, 30 healthy women (NC) and 11 healthy but obese women (OC) as controls to investigate the characteristic gut microbiota and its metabolic functions in obese and non-obese patients with PCOS. The blood and non-menstrual faecal samples of all the participants were collected and analysed. As a result, the Hirsutism score, LH/FSH and serum T level in NG and OG both increased significantly compared with their controls (P < 0.05). High-throughput 16S rRNA gene sequencing revealed that the abundance and diversity of the gut microbiota changed in patients with PCOS. The linear discriminant analysis (LDA) indicated that Lactococcus was the characteristic gut microbiota in NG, while Coprococcus_2 in OG. Correlation heatmap analysis revealed that the sex hormones and insulin levels in human serum were closely related to the changes in the gut microbiota of NG and OG. Functional prediction analysis demonstrated that the citrate cycle pathway enriched both in NG and OG, and other 12 gut bacterial metabolic pathways enriched in NG. This study highlighted significant differences in the gut microbiota and predictive functions of obese and non-obese women with PCOS, thereby providing insights into the role and function of the gut microbiota that may contribute to the occurrence and development of PCOS in obese and non-obese women.