Many studies demonstrated that Zhenwu decoction (ZWD) is effective in the treatment of kidney fibrosis, whereas the mechanism remains unclear. In this work, a microbiomics-based strategy was used to investigate the mechanism of protective effects of ZWD on kidney fibrosis. Unilateral ureteral obstruction was used to replicate a rat model of renal fibrosis, and rats were divided into prophylactic, early, and progression stages according to the timing of administration. Feces was collected to perform microbiota evaluation by high-throughput 16S DNA sequencing. The results indicated that Corynebacterium, Alistipes, Dorea, and Lactonifactor were highlighted as key targeted flora of ZWD in the treatment of renal fibrosis, and their biological functions were related to inflammation, immunity, and renal excretion. Especially, Corynebacterium presented a significant positive correlation with the concentration of Cys-C, Scr, and BUN. The studies on the changes in inflammatory cytokines (INF-γ, IL-1β, IL-4, and TNF-α) and immunoglobulin (IgA, IgM, and IgG) confirmed the beneficial effects of ZWD on kidney fibrosis. Therefore, this study confirmed the protective effect of ZWD against renal fibrosis at various disease stages, and its mechanism was associated with re-establishing dysbiosis of the intestinal microbiota, reducing inflammation, as well as regulating immune functions. In particular, Corynebacterium may be a key flora in the treatment of renal fibrosis.