The beneficial effects of butyric acid in poultry production are well documented, while the relationship between sodium butyrate (SB) and microcapsule sustained-release sodium butyrate (MSSB), especially in yellow broilers, remains poorly investigated. This study was designed to elucidate the function as well as the potential mechanisms of SB and MSSB in enhancing health in yellow broilers. In total, 360 one-day-old yellow broilers were allocated to three treatment groups. The control group (CON) received a basic diet, while the SB group was provided with 1000 mg/kg of sodium butyrate (SB), and the MSSB received microcapsule sustained-release sodium butyrate (MSSB), all over a period of 56 days. Compared to the CON group, the dietary supplementation of both SB and MSSB showed a lower feed:gain ratio (p < 0.01). No significant (p > 0.05) difference in antioxidant capacity was observed between the three groups. We observed significantly higher levels (p < 0.05) of immunoglobulins and a reduction in concentrations in both the SB and MSSB groups compared to the CON group. Furthermore, both SB and MSSB induced alterations in the diversity, structure, and function of gut microbiota. MSSB demonstrated even more pronounced beneficial effects than SB, particularly in regard to the serum IgA level (p = 0.05), cecal isovalerate concentration (p < 0.05), and villus height (p < 0.01). The sequencing of the gut microbiota revealed that MSSB led to a significant increase in the relative abundance of Clostridia UCG-014, Bacilli RF39, and Oscillospiraceae UCG-005. Predictions of bacterial function indicated changes in KEGG pathways, including an enrichment of tryptophan metabolism (ko00380), and a reduction in fructose and mannose metabolism (ko00051), chloroalkane and chloroalkene degradation (ko00625), and naphthalene degradation (ko00626) in yellow broilers fed with MSSB. Among these, the mediation analysis revealed a causal effect between the Clostridia UCG-014 in the gut and serum IgA, with tryptophan metabolism being a key mediator in this relationship. Our results suggest that dietary MSSB can improve the growth performance, immunity, and gut microbiota of yellow broilers. MSSB increased the abundance of Clostridia UCG-014 and activated the tryptophan metabolism pathway (ko00380), contributing to IgA levels in yellow broilers through this mechanism.