Osteoporosis, one of the serious public health problems worldwide, can lead to degeneration of the bone structure and increased risk of fractures. Epigallocatechin gallate (EGCG) is a natural product with potential efficacy in inhibiting bone loss. However, the specific mechanism remains unclear. This study first investigated the role of EGCG in preventing dexamethasone (DEX)-induced osteoporosis by regulating intestinal microbiota and serum metabolites. We detected the bone density, bone microstructure, and changes in intestinal microorganisms and serum metabolites. According to our results, EGCG inhibited the decline of bone density, protected the bone microstructure, increased microbial diversity, promoted the abundance of beneficial bacteria such as Prevotellaceae and Ruminococcus, and inhibited the abundance of pathogenic bacteria such as Peptostreptococcaceae. There were also significant changes in serum metabolites among different treatments. Differential metabolites were mainly involved in sphingolipid metabolism and glycerophospholipid metabolism pathways, especially ceramide (d18:0/16:0(2OH)), phosphatidylserine (P-20:0/20:4(5Z,8Z,11Z,14Z)), phosphatidylserine (18:2(9Z,12Z)/12:0), and phosphatidylethanolamine (O-16:0/0:00), which were increased after EGCG treatment. Notably, most of the above metabolites were positively correlated with bone mineral density, BV/TV and Tb·Th, and negatively correlated with Tb·Sp. In summary, EGCG can prevent bone damage, promote the production of beneficial bacteria and metabolites, and enhance immune function. This study provides a basis and reference for the prevention and treatment of osteoporosis, as well as the application of EGCG in maintaining body health.