Chili pepper (Capsicum annuum L.) is extensively cultivated in China, with its production highly reliant on regional environmental conditions. Given ongoing climate change, it is imperative to assess its impact on chili pepper cultivation and identify suitable habitats for future cultivation. In this study, the MaxEnt model was optimized and utilized to predict suitable habitats for open-field chili pepper cultivation, and changes in these habitats were analyzed using ArcGIS v10.8. Our results showed that the parameter settings of the optimal model were FC = LQPTH and RM = 2.7, and the critical environmental variables influencing chili pepper distribution were annual mean temperature, isothermality, maximum temperature of the warmest month, and precipitation of the warmest quarter. Under current climate conditions, suitable habitats were distributed across all provinces in China, with moderately- and highly-suitable habitats concentrated in the east of the Qinghai–Tibetan Plateau and south of the Inner Mongolia Plateau. Under future climate scenarios, the area of suitable habitats was expected to be larger than the current ones, except for SSP126-2050s, and reached the maximum under SSP126-2090s. The overlapping suitable habitats were concentrated in the east of the Qinghai–Tibetan Plateau and south of the Inner Mongolia Plateau under various climate scenarios. In the 2050s, the centroids of suitable habitats were predicted to shift towards the southwest, except for SSP126, whereas this trend was reversed in the 2090s. Our results suggest that climate warming is conductive to the cultivation of chili pepper, and provide scientific guidance for the introduction and cultivation of chili pepper in the face of climate warming.