Behavioral flexibility, the ability to adjust behavioral strategies in response to changing environmental contingencies and internal demands, is fundamental to cognitive functions. Despite a large body of pharmacology and lesion studies, the precise neurophysiological mechanisms that underlie behavioral flexibility are still under active investigations. This work is aimed to determine the role of a brainstem-to-prefrontal cortex circuit in flexible rule switching. We trained mice to perform a set-shifting task in which they learned to switch attention to distinguish complex sensory cues. Using chemogenetic inhibition, we selectively targeted genetically defined locus coeruleus (LC) neurons or their input to the medial prefrontal cortex (mPFC). We revealed that suppressing either the LC or its mPFC projections severely impaired switching behavior, establishing the critical role of the LC-mPFC circuit in supporting attentional switching. To uncover the neurophysiological substrates of th