Background: Chronic obstructive pulmonary disease (COPD), a prevalent, progressive respiratory disease, has become the third leading cause of death globally. Increasing evidence suggests that intestinal and pulmonary microbiota dysbiosis is associated with COPD. Researchers have shown that T helper (Th) 17/regulatory T (Treg) imbalance is involved in COPD. Qibai Pingfei Capsule (QBPF) is a traditional Chinese medicine used to treat COPD clinically in China. However, the effects of QBPF intervention on the Th17/Treg balance and microbiota in the gut and lung are still poorly understood. Methods: This study divided the rats into three groups (n=8): control, model, and QBPF group. After establishing the model of COPD for four weeks and administration of QBPF for two weeks, Th17 cells, Treg cells, their associated cytokines, transcription factors, and intestinal and pulmonary microbiota of rats were analyzed. Furthermore, the correlations between intestinal and pulmonary microbiota and between bacterial genera and pulmonary function and immune function were measured. Results: The results revealed that QBPF could improve pulmonary function and contribute to the new balance of Th17/Treg in COPD rats. Meanwhile, QBPF treatment could regulate the composition of intestinal and pulmonary microbiota and improve community structure in COPD rats, suppressing the relative abundance of Coprococcus_2 , Prevotella_9 , and Blautia in the gut and Mycoplasma in the lung, but accumulating the relative abundance of Prevotellaceae_UCG_003 in the gut and Rikenellaceae_RC9_gut_group in the lung. Additionally, gut–lung axis was confirmed by the significant correlations between the intestinal and pulmonary microbiota. Functional analysis of microbiota showed amino acid metabolism was altered in COPD rats in the gut and lung. Spearman correlation analysis further enriched the relationship between the microbiota in the gut and lung and pulmonary function and immune function in COPD model rats. Conclusions: Our study indicated that the therapeutic effects of QBPF may be achieved by maintaining the immune cell balance and regulating the gut-lung axis microbiota, providing references to explore the potential biomarkers of COPD and the possible mechanism of QBPF to treat COPD.