The Khapra beetle (Trogoderma granarium Everts) is a well-known storage pest, and it is listed as one of the 100 most invasive species in the world. This study predicted potential geographic distribution of the pest base on MaxEnt model, and assessed the impact of environmental factors on distribution patterns. The study also analyzed future distribution trends and the impact of environmental factors on its distribution. Results indicate that under current climate conditions, central and southern China, the southern United States, North Africa, southern Australia, and Argentina are highly suitable regions for T. granarium. The minimum temperature of the coldest month and elevation are the primary influencing factors, contributing over 95% to the model. Projections for future under SSP126 and SSP585 scenarios suggest no significant expansion in total suitable habitat. However, binary mapping and centroid analysis indicate a northward shift in the species’ suitable range, with new suitable areas emerging primarily in the northern United States, westernmost Russia, southern Kazakhstan, and northern China. These findings offer crucial data that can support the development of pest monitoring systems, early warning protocols, and quarantine strategies in countries at high risk.