The gut microbiota is involved in host responses to high altitude. However, the dynamics of intestinal microecology and their association with altitude-related illness are poorly understood. Here, we used a rat model of hypobaric hypoxia challenge to mimic plateau exposure and monitored the gut microbiome, short-chain fatty acids (SCFAs), and bile acids (BAs) over 28 d. We identified weight loss, polycythemia, and pathological cardiac hypertrophy in hypoxic rats, accompanied by a large compositional shift in the gut microbiota, which is mainly driven by the bacterial families of Prevotellaceae, Porphyromonadaceae, and Streptococcaceae. The aberrant gut microbiota was characterized by increased abundance of the Parabacteroides, Alistipes, and Lactococcus genera and a larger Bacteroides to Prevotella ratio. Trans-omics analyses showed that the gut microbiome was significantly correlated with the metabolic abnormalities of SCFAs and BAs in feces, suggesting an interaction network remodeling of the microbiome-metabolome after the hypobaric hypoxia challenge. Interestingly, the transplantation of fecal microbiota significantly increased the diversity of the gut microbiota, partially inhibited the increased abundance of the Bacteroides and Alistipes genera, restored the decrease of plasma propionate, and moderately ameliorated cardiac hypertrophy in hypoxic rats. Our results provide an insight into the longitudinal changes in intestinal microecology during the hypobaric hypoxia challenge. Abnormalities in the gut microbiota and microbial metabolites contribute to the development of high-altitude heart disease in rats.