Post-translational modification of proteins with ubiquitin and ubiquitin-like proteins (Ubls) is central to the regulation of eukaryotic cellular processes. Our ability to study the effects of ubiquitylation, however, is limited by the difficulty to prepare homogenously modified proteins in vitro and by the impossibility to selectively trigger specific ubiquitylation events in living cells. Here we combine genetic-code expansion, bioorthogonal Staudinger reduction and sortase-mediated transpeptidation to develop a general tool to ubiquitylate proteins in an inducible fashion. The generated ubiquitin conjugates display a native isopeptide bond and bear two point mutations in the ubiquitin C terminus that confer resistance toward deubiquitinases. Nevertheless, physiological integrity of sortase-generated diubiquitins in decoding cellular functions via recognition by ubiquitin-binding domains is retained. Our approach allows the site-specific attachment of Ubls to nonrefoldable, multidomain proteins and enables inducible and ubiquitin-ligase-independent ubiquitylation of proteins in mammalian cells, providing a powerful tool to dissect the biological functions of ubiquitylation with temporal control.