Near infrared spectroscopy (NIR) was applied to discriminate the roots of salvia miltiorhiza Bunge (Danshen for short) and Salvia yunnanensis C. H. Wright (Zidanshen for short) by means of principal component analysis (PCA), improved and simplified K nearest neighbors (IS-KNN). Furthermore, an ultra-high performance liquid chromatographic (UHPLC) coupled with photodiode-array detector was developed for building fingerprints of lipophilic components of Danshen and Zidanshen, respectively. Basing on NIR information, both PCA and IS-KNN method classified the two kinds of Chinese medical herbs with 100% accuracy. The chromatographic fingerprints of the lipophilic components of Danshen and Zidanshen have 10 and 12 common peaks, respectively. Liquid chromatography coupled with mass spectroscopy (LC-MS-MS) was applied to identify these peaks. Among these, three small peaks in the fingerprints of Zidanshen are not found in Danshen, one of which was identified as α-lapachone, and the other two compounds were not yet identified; a small peak after tanshinone IIA in the fingerprints of Danshen was not found in Zidanshen, which was identified as miltirone. The two herbs have 10 common lipophilic components. The similarity between the two reference chromatograms of Zidanshen and Danshen is 0.902, but the mean similaritie between Zidanshen (or Danshen) fingerprints and its own reference chromatogram is 0.973 (or 0.976). The contents of main lipophilic components are significantly lower in Zidanshen than in Danshen (P < 0.01 or P < 0.05). The results indicate that the two Chinese medical materials are not only different in NIR spectra, but also different in species and quantities of lipophilic components. NIR spectra analysis can identify Danshen and Zidanshen rapidly and accurately. UHPLC coupled with MS analysis demonstrates the detail differences between the two herbs both in species and contents of their lipophilic components.