An improved chromatographic method was developed using ultra-performance liquid chromatography-tandem mass spectrometry to identify and quantify phenolic compounds and alkaloids, theobromine and caffeine, in carob flour samples. The developed method has been validated in terms of speed, sensitivity, selectivity, peak efficiency, linearity, reproducibility, limits of detection, and limits of quantification. The chromatographic method allows the identification and quantification of 20 phenolic compounds, that is, phenolic acids, flavonoids, and their aglycone and glucoside forms, together with the determination of the alkaloids, caffeine and theobromine, at low concentration levels all in a short analysis time of less than 20 min.