Elimination of nonnutritional and insoluble compounds is a critical task for any living organism. Flavin-containing monooxygenases (FMOs) attach an oxygen atom to the insoluble nucleophilic compounds to increase solubility and thereby increase excretion. Here we analyze the functional mechanism of FMO from Schizosaccharomyces pombe using the crystal structures of the wild type and protein-cofactor and protein-substrate complexes. The structure of the wild-type FMO revealed that the prosthetic group FAD is an integral part of the protein. FMO needs NADPH as a cofactor in addition to the prosthetic group for its catalytic activity. Structures of the protein-cofactor and protein-substrate complexes provide insights into mechanism of action. We propose that FMOs exist in the cell as a complex with a reduced form of the prosthetic group and NADPH cofactor, readying them to act on substrates. The 4alpha-hydroperoxyflavin form of the prosthetic group represents a transient intermediate of the monooxygenation process. The oxygenated and reduced forms of the prosthetic group help stabilize interactions with cofactor and substrate alternately to permit continuous enzyme turnover.