Each person’s body is host to a large number and variety of gut microbiota, which has been described as the second genome and plays an important role in the body’s metabolic process and is closely related to health. It is common knowledge that proper physical activity and the right diet structure can keep us healthy, and in recent years, researchers have found that this boost to health may be related to the gut microbiota. Past studies have reported that physical activity and diet can modulate the compositional structure of the gut microbiota and further influence the production of key metabolites of the gut microbiota, which can be an effective way to improve body metabolism and prevent and treat related metabolic diseases. In this review, we outline the role of physical activity and diet in regulating gut microbiota and the key role that gut microbiota plays in improving metabolic disorders. In addition, we highlight the regulation of gut microbiota through appropriate physical exercise and diet to improve body metabolism and prevent metabolic diseases, aiming to promote public health and provide a new approach to treating such diseases.