Cortisol in dairy cows is released in an episodic manner underlying a circadian rhythm. The involvement of cortisol in numerous adaptive processes to cope with adverse conditions such as pain and inflammation is well characterized. Recent studies described contradictory effects of nutrition and metabolism on the secretory pattern of cortisol. However, up to now, the direct effects of single metabolites during various metabolic conditions without the profound endocrine changes around parturition on the glucocorticoid secretion in dairy cows have not been described. The objective of this study was to investigate the effects of long-term (56-h) manipulated metabolic states, that is, manipulated plasma concentrations of glucose and β-hydroxybutyrate (BHBA), on the release of cortisol in midlactation dairy cows. Besides the concentration of cortisol at defined time points, its pulsatile secretory pattern was studied in combination with an acute immune challenge through an intramammary lipopolysaccharide (LPS) challenge. Twenty-five midlactation dairy cows were randomly assigned to 1 of 4 treatments (hyperinsulinemic hypoglycemic clamp [HypoG], hyperinsulinemic–euglycemic clamp [EuG], continuous infusion of BHBA [HyperB], or infusion of saline solution for the control group [Control). Different metabolic states induced by infusion treatments affected the characteristics of cortisol secretion (elevation of baseline [the HypoG and HyperB treatments] and decreased peak length [the HypoG treatment]; P < 0.05), whereas amplitude, peak interval, height, peak area, area under the curve (AUC) above the baseline cortisol concentration (AUCb), and the total AUC (AUCt) were not different between infusion treatments. The induced inflammatory response due to the intramammary LPS challenge at simultaneously maintained infusion treatments diminished the pulsatile nature of cortisol release, whereas AUCb (and AUCt, respectively) was lowest for the HypoG treatment compared with the HyperB and Control treatments (P < 0.05). This study indicates that single metabolites (glucose and BHBA) and their availability or turnover (in case of glucose) have a different impact on the regulation of cortisol secretion resulting in changes of its pulsatile release. Furthermore, cortisol release during intramammary inflammation was found to be greater in the HyperB, EuG, and Control treatments compared with the HypoG treatment (P < 0.05). This finding emphasizes the regulatory role of the current metabolic status on the cortisol release during inflammation.