SARS-CoV-2 M pro is a prominent target for anti-SARS-CoV-2 drug discovery efforts. It cleaves the overlapping pp1a and pp1ab polyproteins into functional proteins, a critical step during viral replication. Inhibition of its enzymatic activity could thus block viral replication. Based on the analysis of a co-crystal structure, Pfizer successfully discovered PF 00835231, containing an α-hydroxymethylketone as an electrophilic warhead. PF 00835231 demonstrated potent SARS-CoV-2 M pro inhibition in vitro and in vivo. Structure optimization of PF 00835231 to improve its pharmacokinetic properties and oral bioavailability led to the discovery of PF 07321332 (Nirmatrelvir), a reversible covalent SARS-CoV-2 M pro inhibitor possessing high potency and selectivity. Nirmatrelvir is unique amongst the reported covalent SARS-CoV-2 M pro inhibitors because it employs a nitrile group as an electrophilic warhead unlike aldehydes and α-haloacetamides warheads employed by others. The nitrile warhead covalently reacts with Cys145 of SARS-CoV-2 M pro68 to generate a covalent C-S bond and form a protein-inhibitor complex. Besides the nitrile warhead, the remainder of the Nirmatrelvir structure forms crucial hydrogen bonding and hydrophobic interactions at the active site of the protein.