This study develops a method using ultra-performance liquid chromatography–tandem mass spectrometry (UPLC–MS/MS) to identify and quantify procyanidins, monomers to oligomers, and alkaloids, theobromine and caffeine, in cocoa samples. UPLC analyses were carried out using an Acquity HSS T3 column (100mm×2.1mm i.d., 1.8μm particle size) and gradient elution with water/acetic acid (99.8/0.2, v/v) and acetonitrile. This method was compared with an HPLC–MS/MS method in terms of speed, sensitivity, selectivity, peak efficiency, linearity, reproducibility, detection limits (LODs) and quantification limits (LOQs). Both methodologies were applied and compared to identify and quantify procyanidins and alkaloids from samples of cocoa nib. The results obtained showed that the UPLC–MS/MS methodology allow to determine procyanidins up to nonamers at low-concentration levels in a short analysis time, i.e. less than 12.5min.