Sterols are important molecules in the unsaponifiable fraction of several matrices. Ergosterol, which is an important vitamin D 2 precursor, is clearly the main sterol in mushrooms. Herein, an analytical method for ergosterol determination in cultivated and wild mushrooms was developed using high performance liquid chromatography coupled to ultraviolet detection. The chromatographic separation was achieved in a Inertsil 100A ODS-3 reverse phase column using an isocratic elution with acetonitrile:methanol (70:30, v:v) at a flow rate of 1 mL/min. Different extraction methodologies were tested, using n-hexane, methanol:dichloromethane (75:25, v:v) or chloroform:methanol (20:10, v:v). The method was optimized using Fistulina hepatica and proved to be reproductive and accurate. Ergosterol was the most abundant sterol by a greater extent in all mushrooms. In general, the cultivated species showed higher contents, mainly Agaricus bisporus and Lentinus edodes. Among wild species, Boletus edulis was the mushroom with the highest content in ergosterol. Results were expressed in fat content, dry weight and fresh weight bases. The assessment of ergosterol amounts might be very useful due to the bioactive potential that has been attributed to this molecule and its derivatives.