The COVID-19 pandemic, caused by the novel severe acute respiratory syndrome coronavirus-2, SARS-CoV-2, shows the need for effective antiviral treatments. Here, we present a simulation study of the inhibition of the SARS-CoV-2 main protease (Mpro), a cysteine hydrolase essential for the life cycle of the virus. The free energy landscape for the mechanism of the inhibition process is explored by QM/MM umbrella sampling and free energy perturbation simulations at the M06-2X/MM level of theory for two proposed peptidyl covalent inhibitors sharing the same recognition motif while featuring distinct cysteine-targeting warheads. Regardless of intrinsic reactivity of the modelled inhibitors, namely a Michael acceptor and a hydroxymethylketone activated carbonyl, our results confirm that the inhibitory process takes place by means of a two-step mechanism, in which the formation of an ion pair C145/H41 dyad precedes the protein-inhibitor covalent bond formation, in both cases. The nature of this second step appears to be strongly dependent on the functional groups introduced in the warhead: in the present study, while the nucleophilic attack of the C145 sulfur atom on the C of the double bond of the Michael acceptor takes place concertedly to the proton transfer from H41 to C, in the compound with an activated carbonyl the sulfur attacks the carbonyl carbon concomitant to the proton transfer from H41 to the carbonyl oxygen through the hydroxyl group. Analysis of the free energy profiles, structures along the reaction path, and interactions between the inhibitors and the different pockets of the active site on the protein shows a measurable impact of the warhead on the kinetics and thermodynamics of the process. The present results can be used as a guide to select warheads to design efficient irreversible and reversible inhibitors of SARS-CoV-2 Mpro.