Protease inhibitors are key components in the chemotherapy of HIV infection. However, the appearance of viral mutants routinely compromises their clinical efficacy, creating a constant need for new and more potent inhibitors. Recently, a new class of epoxide-based inhibitors of HIV-1 protease was investigated and the configuration of the epoxide carbons was demonstrated to play a crucial role in determining the binding affinity. Here we report the comparison between three crystal structures at near-atomic resolution of HIV-1 protease in complex with the epoxide-based inhibitor, revealing an in-situ epoxide ring opening triggered by a pH change in the mother solution of the crystal. Increased pH in the crystal allows a stereospecific nucleophile attack of an ammonia molecule onto an epoxide carbon, with formation of a new inhibitor containing amino-alcohol functions. The described experiments open a pathway for the development of new stereospecific protease inhibitors from a reactive lead compound.