The main objective of the present work was to develop a method to determine β-hydroxymethylbutyrate (HMB) and leucine (Leu) in culture media and brain microdialysates. An accurate, selective, and cost-effective method, based on the use of ultrahigh-performance liquid chromatography-tandem mass spectrometry (UHPLC-MS/MS), was developed for the identification and quantification of both compounds. The method consisted of sample dilution, direct injection onto the chromatographic equipment, and quantification with a triple quadrupole mass spectrometer using an electrospray ionization interface in positive mode. The procedure and the UHPLC-MS/MS parameters were accurately optimized to achieve the highest recoveries and to enhance the analytical characteristics of the method. For chromatographic separation, an Acquity UPLC BEH Hilic column using acetonitrile-water gradient with formic acid as additive was employed. The total run time was 4 min. The limits of detection (LODs) obtained ranged from 0.01 to 0.04 μg mL(-1), and the limits of quantification (LOQs) ranged from 0.04 to 0.12 μg mL(-1). Precision (expressed as relative standard deviation) was lower than 15 %, and the determination coefficient (R (2)) was higher than 99.0 % with a residual deviation for each calibration point lower than ±25 %. Mean recoveries were between 85 and 115 %. The method was successfully applied to the analysis of both compounds, HMB and Leu, in samples obtained from an experiment of blood-brain barrier (BBB) passage in vitro and to an experiment of brain microdialysis in rats in vivo after an oral challenge with HMB to detect its appearance in the brain.