The search for efficient inhibitors of the SARS-CoV-2 enzymes is ongoing due to the continuing COVID-19 pandemic. We report the results of computational modeling of the reactions of the SARS-CoV-2 main protease (MPro ) with four potential covalent inhibitors. Two of them, carmofur and nirmatrelvir, have been shown experimentally the ability to inhibit MPro . Two other compounds, X77A and X77C, were designed computationally in this work, derived from the structure of X77, a non-covalent inhibitor forming a tight surface complex with MPro . We modified the X77 structure by introducing warheads capable of efficient chemical reactions with the catalytic cysteine residue in the M Pro active site. The reaction mechanisms of the four molecules with M Pro were investigated by quantum mechanics/molecular mechanics (QM/MM) calculations using large quantum subsystems. First, at the QM/MM level, we optimized structures of stationary points on the potential energy surfaces corresponding to the reactants, products, intermediates, and transition states along the hypothesized reaction coordinates. Analysis of these structures has informed the selection of collective variables for the subsequent calculations of the Gibbs energy profiles using molecular dynamics simulations with QM/MM potentials (QM/MM MD). In these simulations, the QM part was treated by DFT with the PBE0 functional. The results show that all four compounds form covalent adducts with the catalytic cysteine Cys 145 of MPro . From the chemical perspective, the reactions of these four compounds with M Pro follow three distinct mechanisms. In all cases, the reaction is initiated by a nucleophilic attack of the thiolate group of the deprotonated cysteine residue from the catalytic dyad Cys145-His41 of MPro . In the case of carmofur and X77A, the covalent binding of the thiolate to the ligand is accompanied by the formation of the fluoro-uracil leaving group. The reaction with X77C follows the nucleophilic aromatic substitution SN Ar mechanism. The reaction of M Pro with nirmatrelvir, which has a reactive nitrile group, leads to the formation of the covalent thioimidate adduct with the thiolate of the Cys145 residue in the enzyme active site.