Yue et al. find the subtype-specific regulation of Nmnat2 transcription by Raf-MEK-ERK in DRG neurons, while cortical and spinal neurons use a MEK-independent mechanism. This context-dependent axon survival paradigm helps explain differential MEKi vulnerability of PNS and CNS neurons, indicating Nmnat2 as a potential target to counteract MEKi-induced neuropathy.