To date, there are more than 80 ergot alkaloids identified, their distribution depends on different factors (e.g. geographic regions, host plants etc.) and, dependent on the frequency and concentration ingested and the frequency of ingestion, they can cause acute and chronic toxic effect on human health. These toxins commonly infect cereal crops such as triticale and rye, and also wheat, barley and oats. In this regard, considering the growing consumption of plant-based foods compared to food of animal origin, the European Food Safety Authority, has highlighted the need to develop risk assessment strategies. For this reason, the emphasis has been placed on the optimization of extraction efficiency, to quantify the main ergot alkaloids and their epimers, that are now available on the market (ergosine, ergocristine, ergocriptine, ergocornine, ergosinine, ergocristinine, ergocriptinine and ergocorninine). The effectiveness of three different extraction conditions (acidic, alkaline and neutral) followed by a rapid clean-up using dispersive solid-phase extraction with C18 sorbent was evaluated by ultra performance liquid chromatography tandem quadrupole mass spectrometry (UPLC-MS/MS), resulting in a short chromatographic run (16 min). The method was developed and validated in five different cereal production chains (rye, oat, wheat, wheat gluten and baby food). The efficiency and efficacy of extraction methods were evaluated and compared as well as obtained recoveries. The verified linear range was 0.5–500 µg kg− 1 for all the tested compounds, according to the legal limits. The limits of quantification were dependent on the analyte but almost independent from the matrices. Recovery values for the 8 ergot alkaloids spiked at levels of 2, 20 and 100 µg kg− 1 were calculated for each matrix extracted with its best extraction protocol and were completely satisfactory. The applicability and the trueness of the method were examined by analysing a set of 54 samples, including also other cereals like spelt, tritordeum and triticale, and evaluating some reference materials.