The layered character of transition metal diborides (TMB2:s)---with three structure polymorphs representing different stackings of the metallic sublattice---evokes the possibility of activating phase-transformation plasticity via mechanical shear strain. This is critical to overcome the most severe limitation of TMB2:s: their brittleness. To understand finite-temperature mechanical response of the α, ω, and γ polymorphs at the atomic scale, we train machine-learning interatomic potentials (MLIPs) for TMB2:s, TM=(Ti, Ta, W, Re). Validation against ab initio data set supports the MLIPs' capability to predict structural and elastic properties, as well as shear-induced slipping and phase transformations. Nanoscale molecular dynamics simulations (>104 atoms; ≈53 nm3) allow minimizing size effects, thus evaluating theoretical shear strengths attainable in single-crystal TMB2:s and their temperature evolution from 300 up to 1200 K. Quantitative structural analysis via angular and bond-order parameter descriptors shows that xz and yz shearing activates transformations between the (energetically) metastable and the preferred phase of TiB2, TaB2, and WB2. These transformations can be promoted by additional tensile or compressive strain along the [0001] axis. The preferred phase of ReB2 shows negative thermal expansion and an unprecedented shear-induced plasticity mechanism: metallic/boron layer interpenetration and uniform lattice rotation.