BackgroundExploring the association of diet and indoor and outdoor environments on the gut microbiome of red-crowned cranes. We investigated the microbiome profile of the 24 fecal samples collected from nine cranes from day 1 to 35. Differences in the gut microbiome composition were compared across diet and environments.ResultsA total of 2,883 operational taxonomic units (OTUs) were detected, with 438 species-specific OTUs and 106 OTUs common to the gut microbiomes of four groups. The abundance of Dietzia and Clostridium XI increased significantly when the red-crowned cranes were initially fed live mealworms. Skermanella and Deinococcus increased after the red-crowned cranes were fed fruits and vegetables and placed outdoors. Thirty-three level II pathway categories were predicted. Our study revealed the mechanism by which the gut microbiota of red-crowned cranes responds to dietary and environmental changes, laying a foundation for future breeding, nutritional and physiological studies of this species.ConclusionsThe gut microbiome of red-crowned cranes could adapt to changes in diet and environment, but the proportion of live mealworms in captive red-crowned cranes can be appropriately reduced at the initial feeding stage, reducing the negative impact of high-protein and high-fat foods on the gut microbiome and growth and development.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12917-023-03636-x.