<b><i>Objectives:</i></b> The aim of this study was to investigate the effects of berberine on polycystic ovary syndrome (PCOS) with insulin resistance (IR). <b><i>Design:</i></b> This study performed 16S rRNA sequencing and metabolomic analysis on dehydroepiandrosterone (DHEA)-induced PCOS rats treated with berberine, focusing on the improvement of PCOS-IR by modifying gut microbiota and metabolism. <b><i>Methods:</i></b> Forty-two female Sprague Dawley rats were randomly divided into 4 experimental groups of 8 rats each (PCOS + HFD, PCOS + HFD + BBR, NCD + PCOS, and NCD + PCOS + BBR groups). Homeostasis model assessment of insulin resistance (HOMA-IR) index-related indicators and hormone level in serum were analyzed. 16S rRNA sequencing and metabolomic analysis were performed on DHEA-induced PCOS rats treated with berberine. In addition, the differential microbiotas and metabolites were screened. Also, enrichment analysis was carried out on the differential metabolites. Finally, we constructed a correlation network to analyze the correlation between differential microbiotas and metabolites. <b><i>Results:</i></b> Firmicutes and Bacteroidetes were changed at the phylum level, and <i>Romboutsia</i>, <i>Bacteroides</i>, and <i>Clostridium_sensu_stricto_1</i> were changed at the genus level after berberine treatment. In addition, a total of 26 differential operational taxonomic units and 3 metabolites (glutamine, unsaturated acids [CH = CH], and glucose) between 2 groups were obtained. Moreover, these metabolites were mainly involved in type 2 diabetes mellitus, 2-component system, and ABC transporter Kyoto Encyclopedia of Genes and Genomes pathways. And, 3 microbiotas (<i>Lachnospiraceae_NC2004_group</i>, <i>Flavonifractor</i>, and <i>Parasutterella</i>) were regulated by glucose and glutamine. <b><i>Limitations:</i></b> The sample size involved in this study is relatively small. In addition, relevant experiments need to be performed to verify the obtained results from this study, and in-depth functional studies are needed. <b><i>Conclusions:</i></b> Berberine is effective in improving the pathological condition in PCOS by regulating the gut microbiotas and metabolites. This study will provide evidence for therapeutic efforts to treat PCOS-IR using berberine.