This document presents a study on the determination of methylxanthines (caffeine, theobromine, and theophylline) in cocoa, coffee, and tea using HPLC. The author develops and validates an HPLC method for extracting and analyzing the methylxanthine content of different samples. Results show theobromine is mainly present in cocoa, caffeine is abundant in coffee, and only trace amounts of theophylline are found in the three samples. Gas chromatography-mass spectrometry is also used to identify methylxanthines and observe their fragmentation patterns.