Boceprevir is an HCV NSP3 inhibitor that has been explored as a repurposed drug for COVID-19. It inhibits the SARS-CoV-2 main protease (M Pro ) and contains an α-ketoamide warhead, a P1 β-cyclobutylalanyl moiety, a P2 dimethylcyclopropylproline, a P3 tert -butyl-glycine, and a P4 N -terminal tert -butylcarbamide. By introducing modifications at all four positions, we synthesized 20 boceprevir-based M Pro inhibitors including PF-07321332 and characterized their M Pro inhibition potency in test tubes ( in vitro ) and human host cells ( in cellulo ). Crystal structures of M Pro bound with 10 inhibitors and antiviral potency of 4 inhibitors were characterized as well. Replacing the P1 site with a β-(S-2-oxopyrrolidin-3-yl)-alanyl (opal) residue and the warhead with an aldehyde leads to high in vitro potency. The original moieties at P2, P3 and the P4 N -terminal cap positions in boceprevir are better than other tested chemical moieties for high in vitro potency. In crystal structures, all inhibitors form a covalent adduct with the M Pro active site cysteine. The P1 opal residue, P2 dimethylcyclopropylproline and P4 N -terminal tert -butylcarbamide make strong hydrophobic interactions with M Pro , explaining high in vitro potency of inhibitors that contain these moieties. A unique observation was made with an inhibitor that contains an P4 N -terminal isovaleramide. In its M Pro complex structure, the P4 N -terminal isovaleramide is tucked deep in a small pocket of M Pro that originally recognizes a P4 alanine side chain in a substrate. Although all inhibitors show high in vitro potency, they have drastically different in cellulo potency in inhibiting ectopically expressed M Pro in human 293T cells. All inhibitors including PF-07321332 with a P4 N -terminal carbamide or amide have low in cellulo potency. This trend is reversed when the P4 N -terminal cap is changed to a carbamate. The installation of a P3 O-tert -butyl-threonine improves in cellulo potency. Three molecules that contain a P4 N -terminal carbamate were advanced to antiviral tests on three SARS-CoV-2 variants. They all have high potency with EC 50 values around 1 μM. A control compound with a nitrile warhead and a P4 N -terminal amide has undetectable antiviral potency. Based on all observations, we conclude that a P4 N -terminal carbamate in a boceprevir derivative is key for high antiviral potency against SARS-CoV-2.