Due to its detrimental impact on human health and the environment, regulations demand ultralow sulfur levels on fossil fuels, in particular in diesel. However, current desulfurization techniques are expensive and cannot efficiently remove heteroaromatic sulfur compounds, which are abundant in crude oil and concentrate in the diesel fraction after distillation. Biodesulfurization via the four enzymes of the metabolic 4S pathway of the bacterium Rhodococcus erythropolis (DszA-D) is a possible solution. However, the 4S pathway needs to operate at least 500 times faster for industrial applicability, a goal currently pursued through enzyme engineering. In this work, we unveil the catalytic mechanism of the flavin monooxygenase DszA. Surprisingly, we found that this enzyme follows a recently proposed atypical mechanism that passes through the formation of an N 5 OOH intermediate at the re side of the cofactor, aided by a well-defined, predominantly hydrophobic O 2 pocket. Besides clarifying the unusual chemical mechanism of the complex DszA enzyme, with obvious implications for understanding the puzzling chemistry of flavin-mediated catalysis, the result is crucial for the rational engineering of DszA, contributing to making biodesulfurization attractive for the oil refining industry.