Zanthoxylum, as a medicinal and edible herbal medicine, has a long history and complex chemical composition. There are many varieties of Zanthoxylum, and there are differences in composition between varieties. In this study, a rapid classification and identification method for the main components of Zanthoxylum was established using ultra‐high‐performance‐liquid chromatography quadrupole‐orbitrap‐mass spectrometry. The components of Shandong Zanthoxylum bungeanum, Wudu Zanthoxylum bungeanum, and Zanthoxylum schinifolium were identified by studying the characteristic fragmentations and neutral losses of characteristic components. A total of 48 common components and 24 different components were identified and the fragmentation patterns of the main components, such as flavonoids, alkaloids, and organic acids were summarized. These findings provided a reference for the study of pharmacodynamic substance basis and quality control of different varieties of Zanthoxylum.