Mitogen-activated protein kinases (MAPKs) have a docking groove that interacts with linear "docking" motifs in binding partners. To determine the structural basis of binding specificity between MAPKs and docking motifs, we quantitatively analyzed the ability of 15 docking motifs from diverse MAPK partners to bind to c-Jun amino-terminal kinase 1 (JNK1), p38α, and extracellular signal-regulated kinase 2 (ERK2). Classical docking motifs mediated highly specific binding only to JNK1, and only those motifs with a sequence pattern distinct from the classical MAPK binding docking motif consensus differentiated between the topographically similar docking grooves of ERK and p38α. Crystal structures of four complexes of MAPKs with docking peptides, representing JNK-specific, ERK-specific, or ERK- and p38-selective binding modes, revealed that the regions located between consensus positions in the docking motifs showed conformational diversity. Although the consensus positions in the docking motifs served as anchor points that bound to common MAPK surface features and mostly contributed to docking in a nondiscriminatory fashion, the conformation of the intervening region between the anchor points mostly determined specificity. We designed peptides with tailored MAPK binding profiles by rationally changing the length and amino acid composition of intervening regions located between anchor points. These results suggest a coherent structural model for MAPK docking specificity that reveals how short linear motifs binding to a common kinase docking groove can mediate diverse interaction patterns and contribute to correct MAPK partner selection in signaling networks.