The β-lactam ring represents a valuable moiety that can induce covalent binding of an inhibitor to its target. In this study, we explored di- and tripeptides with β-lactam electrophilic warheads as inhibitors of dengue and West Nile virus NS2B-NS3 protease. Tripeptides with a (3S)-β-lactam moiety displayed the highest activity, with IC50 and EC50 values in the lower micromolar range in biochemical and cellular assays. The activity against dengue protease was in general higher than against West Nile virus protease. The compounds were inactive against the off-targets thrombin and trypsin. Liquid chromatography-mass spectrometry experiments revealed that tripeptide-β-lactam inhibitors bind to the protease in two distinct binding modes. Only one binding mode leads to a covalent, but reversible, interaction of the β-lactam ring with the catalytic serine, followed by release of the inhibitor with opened β-lactam ring. The other binding mode leads to the cleavage of the peptide backbone. This observation provides the first experimental evidence that benzyloxyphenylglycine in flaviviral protease inhibitors is positioned in the prime site of the enzyme.