Helicobacter pylori (H. pylori) infects approximately half of the population worldwide and causes chronic gastritis, peptic ulcers, and gastric cancer. Test-and-treat strategies have been recommended for the prevention of H. pylori-associated diseases. Advancements in high-throughput sequencing technologies have broadened our understanding of the complex gastrointestinal (GI) microbiota and its role in maintaining host homeostasis. Recently, an increasing number of studies have indicated that the colonization of H. pylori induces dramatic alterations in the gastric microbiota, with a predominance of H. pylori and a reduction in microbial diversity. Dysbiosis of the gut microbiome has also been observed after H. pylori infection, which may play a role in the development of colorectal cancer. However, there is concern regarding the impact of antibiotics on the gut microbiota during H. pylori eradication. In this review, we summarize the current literature concerning how H. pylori infection reshapes the GI microbiota and the underlying mechanisms, including changes in the gastric environment, immune responses, and persistent inflammation. Additionally, the impacts of H. pylori eradication on GI microbial homeostasis and the use of probiotics as adjuvant therapy are also discussed. The shifts in the GI microbiota and their crosstalk with H. pylori may provide potential targets for H. pylori-related gastric diseases and extragastric manifestations.