The mammalian cortex exerts top-down control of the thalamus by either enhancing or suppressing incoming sensory signals. This is thought to be accomplished via direct and indirect corticothalamic pathways that respectively increase and decrease the activity of thalamic relays1–4. Here, we discovered that in a reciprocally connected thalamocortical loop involving the dorsal midline thalamus, and unlike for sensory systems, top-down control by the cortex is predominantly indirect and through the thalamic reticular nucleus (TRN). Specifically, we found that the prelimbic area of the medial prefrontal cortex—a region mediating the selection and execution of emotional and motivated behavior5–8—shapes the decision to engage in and initiate instrumental avoidance responses via TRN projections to the paraventricular thalamus. Our findings reveal novel intra-thalamic circuit dynamics that gate cortical cognitive signals to shape goal-oriented actions.