The role of the ERK signalling pathway in cancer is thought to be most prominent in tumours in which mutations in the receptor tyrosine kinases RAS, BRAF, CRAF, MEK1 or MEK2 drive growth factor-independent ERK1 and ERK2 activation and thence inappropriate cell proliferation and survival. New drugs that inhibit RAF or MEK1 and MEK2 have recently been approved or are currently undergoing late-stage clinical evaluation. In this Review, we consider the ERK pathway, focusing particularly on the role of MEK1 and MEK2, the 'gatekeepers' of ERK1/2 activity. We discuss their validation as drug targets, the merits of targeting MEK1 and MEK2 versus BRAF and the mechanisms of action of different inhibitors of MEK1 and MEK2. We also consider how some of the systems-level properties (intrapathway regulatory loops and wider signalling network connections) of the ERK pathway present a challenge for the success of MEK1 and MEK2 inhibitors, discuss mechanisms of resistance to these inhibitors, and review their clinical progress.