The post-translational modification of proteins with polyubiquitin regulates virtually all aspects of cell biology. Eight distinct chain linkage types co-exist in polyubiquitin and are independently regulated in cells. This ‘ubiquitin code’ determines the fate of the modified protein1. Deubiquitinating enzymes of the ovarian tumour (OTU) family regulate cellular signalling by targeting distinct linkage types within polyubiquitin2, and understanding their mechanisms of linkage specificity gives fundamental insights into the ubiquitin system. Here we reveal how the deubiquitinase Cezanne (also known as OTUD7B) specifically targets Lys11-linked polyubiquitin. Crystal structures of Cezanne alone and in complex with monoubiquitin and Lys11-linked diubiquitin, in combination with hydrogen-deuterium exchange mass spectrometry, enable us to reconstruct the enzymatic cycle in great detail. An intricate mechanism of ubiquitin-assisted conformational changes activates the enzyme, and while all chain types interact with the enzymatic S1 site, only Lys11-linked chains can bind productively across the active site and stimulate catalytic turnover. Our work highlights the plasticity of deubiquitinases and indicates that new conformational states can occur when a true substrate, such as diubiquitin, is bound at the active site.