The changing global climate has significantly impacted the spread of plant pests. The cassava mealybug (Phenacoccus manihoti) is among the most dangerous quarantine pests affecting cassavas worldwide, causing substantial losses in agricultural production and food security across several regions. Although China is currently free of the cassava mealybug, its proximity to affected countries and extensive trade with these regions necessitate a detailed understanding of the pest's distribution pattern and dynamic ecological niche changes. Using the Biomod2 model, we selected two historical climate scenarios and two future climate scenarios (SSP1-2.6 and SSP5-8.5) to investigate the distribution patterns, potential habitats, distribution centers, and dynamic ecological niches of cassava mealybugs in China. Key environmental variables influencing the distribution were identified, including bio4, bio8, bio12, bio18, and bio19. The potential habitat of cassava mealybugs is mainly located in several provinces in southern China. In the future, the suitable habitat is projected to expand slightly under the influence of climate change, maintaining the overall trend, but the distribution center of suitable areas will shift northward. Dynamic ecological niche prediction results indicate the potential for further expansion; however, the ecological niches may be unequal and dissimilar in the invaded areas. The predictions could serve as a valuable reference for early warning systems and management strategies to control the introduction of cassava mealybugs.