An ab initio quantum Monte Carlo method is introduced for calculating total rates of muon weak capture in light nuclei with mass number $A leq 12$. As a first application of the method, we perform a calculation of the rate in $^4$He in a dynamical framework based on realistic two- and three-nucleon interactions and realistic nuclear charge-changing weak currents. The currents include one- and two-body terms induced by $pi$- and $rho$-meson exchange, and $N$-to-$Delta$ excitation, and are constrained to reproduce the empirical value of the Gamow-Teller matrix element in tritium. We investigate the sensitivity of theoretical predictions to current parametrizations of the nucleon axial and induced pseudoscalar form factors as well as to two-body contributions in the weak currents. The large uncertainties in the measured values obtained from bubble-chamber experiments (carried out over 50 years ago) prevent us from drawing any definite conclusions.