The mechanisms which determine the nuclear accumulation and inactivation of the extracellular signal-regulated kinase 1 (ERK1) or ERK2 mitogen-activated protein (MAP) kinases are poorly understood. Here we demonstrate that DUSP5, an inducible nuclear phosphatase, interacts specifically with ERK2 via a kinase interaction motif (KIM) within its amino-terminal noncatalytic domain. This binding determines the substrate specificity of DUSP5 in vivo, as it inactivates ERK2 but not Jun N-terminal protein kinase or p38 MAP kinase. Using green fluorescent protein fusions, we identify within this same domain of DUSP5 a functional nuclear localization signal (NLS) which functions independently of the KIM. Moreover, we demonstrate that the expression of DUSP5 causes both nuclear translocation and sequestration of inactive ERK2. Nuclear anchoring is ERK2 specific and requires both interactions between the DUSP5 KIM and the common docking site of ERK2 and a functional NLS within DUSP5. Finally, the expression of a catalytically inactive mutant of DUSP5 also tethers ERK2 within the nucleus. Furthermore, this nuclear ERK2 is phosphorylated by MAP kinase kinase in response to growth factors and also activates transcription factor Elk-1. We conclude that DUSP5 is an inducible nuclear ERK-specific MAP kinase phosphatase that functions as both an inactivator of and a nuclear anchor for ERK2 in mammalian cells. In addition, our data indicate that the cytoplasm may not be an exclusive site of MAP kinase activation.