M-shell x-ray production cross sections for selected heavy elements, namely, $_{72}\mathrm{Hf}$, $_{73}\mathrm{Ta}$, $_{74}\mathrm{W}$, $_{75}\mathrm{Re}$, $_{76}\mathrm{Os}$, $_{77}\mathrm{Ir}$, $_{78}\mathrm{Pt}$, $_{79}\mathrm{Au}$, $_{83}\mathrm{Bi}$, and $_{90}\mathrm{Th}$, were measured for protons of energy 0.6--4.0 MeV. The experimental results are compared with the predictions of the first Born and semiclassical approximations for M-shell ionization; these data are also compared with the theory that accounts for the projectile's energy loss and Coulomb deflection as well as for the target's M-shell electron perturbed stationary state and relativistic nature (ECPSSR). Generally, fair agreement between the data and the ECPSSR theory is found. Some systematical discrepancies observed for the lightest elements (Hf, Ta, and W) are explained as possible ambiguities in the M-shell Coster-Kronig factors and fluorescence yields, which were used to convert theoretical M-subshell ionization cross sections to the total M-x-ray production cross sections. The experimental total M-shell ionization cross sections were obtained from measured M-x-ray cross sections using the proposed approximate average fluorescence yield \ensuremath{\omega}${\mathrm{\ifmmode\bar\else\textasciimacron\fi{}}}_{\mathit{M}}$ that relies on two fluorescence yields and the Coster-Kronig factor for only ${\mathit{M}}_{4}$ and ${\mathit{M}}_{5}$ subshells.