The mechanistic pathway by which the hazardous diazo transfer reagent methanesulfonyl azide can be formed in situ, from methanesulfonyl chloride and aqueous sodium azide, has been investigated using real-time reaction monitoring by FlowNMR. In the presence of triethylamine, rapid generation of methanesufonyl azide is observed, via a mechanistic pathway consistent with involvement of a sulfene or methanesulfonyl triethylammonium intermediate. Accordingly, it is possible to generate and use methanesulfonyl azide in a single synthetic step for a diazo transfer process.