Hydrodesulfurization (HDS) and hydrodenitrogenation (HDN) are large‐scale commercial processes that occur when petroleum feedstocks are treated with hydrogen (H
2
) at moderately high pressures and temperatures. During the reactions, the organosulfur and organonitrogen molecules liberate H
2
S and NH
3
. The process results in the production of hydrocarbon fuels with low levels of sulfur and nitrogen. Such fuels are necessary in order to prevent pollution of the atmosphere by sulfur and nitrogen oxides. The HDS and HDN processes are catalyzed by heterogeneous catalysts consisting of molybdenum and cobalt sulfides supported on alumina. Because it is experimentally impossible to determine details of the HDS and HDN processes as they occur on catalyst surfaces, detailed transformations that may occur on the catalyst are modeled by reactions that occur in transition metal complexes that can be fully characterized. As models for the adsorption of thiophenes, benzothiophenes, indoles, and quinolines on metal sites of the catalyst surface, these organosulfur and organonitrogen compounds are coordinated to metals in a variety of complexes. This coordination occurs through the sulfur or nitrogen atom or through π‐bonds in the hydrocarbon portion of the molecules and depends on the electronic state of the metal center. Once coordinated to a metal center, the organosulfur or organonitrogen compound is activated in ways that lead to the cleavage of CS and CN bonds, which are also reactions that occur in the heterogeneous HDS and HDN reactions. Patterns of reactivity of organosulfur and organonitrogen compounds in their metal complexes are used to propose detailed mechanisms for the steps that lead to the formation of H
2
S and NH
3
in the catalytic processes. The validity of these mechanisms has been tested in a range of isotopic labeling, spectroscopic, and reactivity investigations on the heterogeneous catalysts. Not only have the studies of organosulfur and organonitrogen complexes provided a basis for understanding and potentially improving the HDS and HDN processes, they have led to new approaches to the removal of sulfur and nitrogen and to new transformations of organosulfur and organonitrogen compounds.