An ion-pair reversed-phase high-performance liquid chromatography with gradient elution and UV detection was used to measure adenine (A) and guanine (G) in lyophilized bacterial pellets from ruminants using allopurinol as internal standard. The separation was performed on a Symmetry C18 column and the detection was monitored at 280 nm. Calibration curves were found to be linear in the concentration range from 5 to 50 mg/l with correlation coefficients (r2)>0.999. Mean recoveries of A and G standards added to bacterial samples were 102.2 and 98.2, respectively. The method proposed yielded sharp, well-resolved peaks within 25 min and was successfully applied for the determination of A and G in bacterial pellets.