The leading-order electromagnetic and strong isospin-breaking corrections to the ratio of $K_{mu 2}$ and $pi_{mu 2}$ decay rates are evaluated for the first time on the lattice, following a method recently proposed. The lattice results are obtained using the gauge ensembles produced by the European Twisted Mass Collaboration with $N_f = 2 + 1 + 1$ dynamical quarks. Systematics effects are evaluated and the impact of the quenched QED approximation is estimated. Our result for the correction to the tree-level $K_{mu 2} / pi_{mu 2}$ decay ratio is $-1.22,(16) %$ to be compared to the estimate $-1.12,(21) %$ based on Chiral Perturbation Theory and adopted by the Particle Data Group.