The crucial structural motive in viral protease inhibitors such as atazanavir and darunavir is a chiral aminoalcohol structure. The structure is generally introduced during the synthesis of the protease inhibitor via an α-chloroketone intermediate. The α-chloroketone can be synthesized in a multistep sequence from naturally occurring l-phenylalanine. Herein, we report a onepot synthesis of an α-chloroketone starting from N-Boc-l-phenylalanine in a novel type of “tube-in-flask” semi-batch diazomethane generator. Activation of the amino acid to the mixed anhydride was carried out in the flask, while diazomethane was generated from in situ formed N-nitroso-N-methylurea within a gas-permeable tubing contained inside the flask. The diazomethane diffused through the gas-selective membrane into the flask, and reacted with the anhydride to the diazoketone (Arndt—Eistert reaction). The addition of aqueous hydrogen chloride provided the α-chloroketone and destroyed any excess of diazomethane. The desired product was isolated by extraction in excellent purity and yield (90%–96%).