A wealth of data has elucidated the mechanisms by which sensory inputs are encoded in the neocortex, but how these processes are regulated by the behavioral relevance of sensory information is less understood. Here, we focus on neocortical layer 1 (L1), a key location for processing of such top-down information. Using Neuron-Derived Neurotrophic Factor (NDNF) as a selective marker of L1 interneurons (INs) and in vivo 2-photon calcium imaging, electrophysiology, viral tracing, optogenetics, and associative memory, we find that L1 NDNF-INs mediate a prolonged form of inhibition in distal pyramidal neuron dendrites that correlates with the strength of the memory trace. Conversely, inhibition from Martinotti cells remains unchanged after conditioning but in turn tightly controls sensory responses in NDNF-INs. These results define a genetically addressable form of dendritic inhibition that is highly experience dependent and indicate that in addition to disinhibition, salient stimuli are encoded at elevated levels of distal dendritic inhibition.