The nucleation of gas bubbles in magmas is fundamental to controlling the dynamics of volcanic eruptions. In this study, we addressed nucleation in a volatile-saturated liquid triggered by viscous shear, which is ubiquitous in volcanic environments. By combining laboratory experiments, theoretical analysis, and numerical simulations, we investigated the conditions under which the mechanical energy associated with shearing favors the formation and growth of gas molecule nuclei in a liquid supersaturated with volatiles. Our results reveal that the critical shear stress for nucleation decreases as the volatile supersaturation increases. Dimensional analysis applied to natural systems shows that shear-induced nucleation is likely to occur in volcanic conduits, which has implications for magma degassing processes and eruptive styles.