Biogeographic barriers to gene flow are central to studies of plant phylogeography. There are many physical and geographic barriers in China, but few studies have used molecular ecological evidence to investigate the natural geographic isolation barrier of the Qinling Mountains-Huaihe River Line (QHL). Allium macrostemon is a precious Chinese perennial herb belonging to the Amaryllidaceae family. It is used as a food and medicine, with a variety of health and healing properties. Five SSR markers, three chloroplast DNA (cpDNA) markers (psbA-trnH, rps16 and trnL-F), one nuclear ribosomal DNA (nrDNA) marker (ITS), and simplified genome GBS sequencing were used to analyse the genetic diversity and structure of A. macrostemon. Combining SSR, cpDNA, nrDNA ITS data and GBS analysis results, we divided A. macrostemon populations into northern and southern groups, with the southern group further divided into southwestern and central-southeastern groups. Niche simulation results reveal that the distribution area of A. macrostemon will reach its maximum in the future. These data indicate that the regional separation of A. macrostemon has been maintained by the combined influence of a geographical barrier and Quaternary climate, and that the back-and-forth fluctuations of QHL and Quaternary climate have played an important role in this process. QHL acts as a north-south dividing line in phylogeography and population genetic structure, promoting physical geographic isolation. This study provides a theoretical basis for the conservation, development, and utilization of A. macrostemon resources. It further provides a reference for understanding the systematic geographical pattern of the large-scale spatial distribution of plants in China and enriches our understanding of Quaternary plant evolution in areas with complex terrain.