Nucleosides and nucleobases are one of the most important indicators of quality control. A sensitive and reliable high performance liquid chromatography-ultraviolet method was applied to analyse 13 nucleosides and nucleobases simultaneously in 15 batches of nine Ophiocordyceps species and its allies in China. Principal component analysis (PCA) and cluster analysis were conducted by SPSS 22.0 software (IBM Corp., Armonk, NY, USA). The 15 samples of Cordyceps were differentiated successfully based on their nucleoside and nucleobase content. Total nucleosides content in mycelium was significantly higher than that in the natural fruiting bodies of Ophiocordyceps sinensis (NFOS). Five nucleosides or nucleobases – adenine (A), guanosine (Gu), uracil (U), uridine (Ur) and guanine (G) – were the major components contributed to the total variance according to PCA. The profiles of the 13 tested nucleosides and nucleobases (including adenosine, cytidine, guanosine, inosine, thymidine, uridine, cordycepin, adenine, cytosine, guanine, thymine, uracil and hypoxanthine) can discriminate different samples and can be candidate indicators applied for the quality control of Ophiocordyceps and its allies.