A healthy gut is one of the main factors influencing bird response. Over the years, efforts have been made to improve intestinal health. One of the supporting methods may be enriching the diet with bioactive ingredients, including sodium butyrate (SB). One of the possible ways of administering such supplementation is in ovo technology. Over the years, research has shown that administering bioactive substances this way has a positive effect on the health status of chickens. The current study aimed to modify the gut microbiota of broiler chickens by in ovo stimulation on d 12 of egg incubation with SB and to determine the changes occurring in intestines. One thousand eggs were incubated and injected with 0.1, 0.3, or 0.5% SB on d 12 of incubation. The control group was injected with physiological saline. Samples collected for analysis were obtained postmortem from 42-day-old ROSS 308 broiler chickens. Growth performance parameters were also monitored during broiler rearing. Gene expression analysis showed significant changes in the levels of IL4, IFNγ, AvBD1, TJAP and MUC6 genes in the ileum. However, the IL8, MUC2 and MUC6 genes were significantly expressed in the cecal mucosa. These changes depended on the administered dose of butyrate. There was no effect of in ovo administration of various doses of SB on digesta pH, SCFA level and histological parameters. However, a significant increase in Bifidobacterium bacteria was detected in the ileum after administration of a dose of 0.5% SB and in the cecum after administration of a dose of 0.3%. Administration of SB in ovo has the potential to support intestinal health in poultry. The effects depend on the administered dose, while the results indicate a dose of 0.3% as the most optimal.