The Qinling Mountains in East Asia serve as the geographical boundary between the north and south of China and are also indicative of climatic differences, resulting in rich ecological and species diversity. However, few studies have focused on the responses of plants to geological and climatic changes in the Qinling Mountains and adjacent regions. Therefore, we investigated the evolutionary origins and phylogenetic relationships of three Pedicularis species in there to provide molecular evidence for the origin and evolution of plant species. Ecological niche modeling was used to predict the geographic distributions of three Pedicularis species during the last interglacial period, the last glacial maximum period, and current and future periods, respectively. Furthermore, the distribution patterns of climate fluctuations and the niche dynamics framework were used to assess the equivalence or difference of niches among three Pedicularis species. The results revealed that the divergence of three Pedicularis species took place in the Miocene and Holocene periods, which was significantly associated with the large-scale uplifts of the Qinling Mountains and adjacent regions. In addition, the geographic distributions of three Pedicularis species have undergone a northward migration from the past to the future. The most important environmental variables affecting the geographic distributions of species were the mean diurnal range and annual mean temperature range. The niche divergence analysis suggested that the three Pedicularis species have similar ecological niches. Among them, P. giraldiana showed the highest niche breadth, covering nearly all of the climatic niche spaces of P. dissecta and P. bicolor. In summary, this study provides novel insights into the divergence and origins of three Pedicularis species and their responses to climate and geological changes in the Qinling Mountains and adjacent regions. The findings have also provided new perspectives for the conservation and management of Pedicularis species.