Spontaneous hypercortisolism (HC) is a common endocrine disease of senior dogs, often overlapping in selected clinical signs and hematologic and blood biochemical abnormalities with nonadrenal diseases (NADs). HC and NAD could differentially affect cortisol metabolism, which is a complex 10-enzymatic pathway process. HC might also affect blood and urine lactate levels through its effects on mitochondrial function. We aimed to differentiate between HC and NAD via a urinary cortisol metabolites and lactate panel. We prospectively recruited 7 healthy dogs and 18 dogs with HC, 15 with congestive heart failure (CHF), and 9 with NAD. We analyzed urine by gas chromatography-mass spectrometry and liquid chromatography-mass spectrometry. We normalized urinary lactate and cortisol metabolites to urine creatinine concentration, and then compared groups using a linear-mixed model and principal component (PC) analysis. A machine-learning classification algorithm generated a decision tree (DT) model for predicting HC. The least-squares means of normalized urinary 6β-hydroxycortisol and PC1 of the HC and CHF groups were higher than those of the healthy and NAD groups (p = 0.05). Creatinine-normalized urinary 6β-hydroxycortisol had better sensitivity (Se, 0.78; 95% CI: 0.55-0.91), specificity (Sp, 0.89; 95% CI: 0.57-0.99), and a likelihood ratio (LR; 7), than the Se (0.72; 95% CI: 0.49-0.88), Sp (0.89; 95% CI: 0.57-0.99), and LR (6.5) of PC1 for distinguishing HC from NAD. Lactate and dihydrocortisone had the highest decreasing node-weighted impurity value and were considered the most important features in the DT model; dihydrocortisol had no role in determining whether a dog had HC.