Reducing the level of sulfur content in fuel oils has long been desired for environmental reasons. Polyoxometalates (POMs) can act as catalysts to remove sulfur-containing heterocyclic compounds by the process of oxidative desulfurization under mild conditions. However, one key obstacle to the development of POM-based catalysts is the poor solubility of POMs in the overall nonpolar environment. We report a novel strategy for the introduction of catalytically active POMs into nonpolar reaction systems by encapsulating the inorganic catalyst within the pores of a metal–organic framework structure in which the organic ligands act as hydrophobic groups. The nanocrystalline catalysts, obtained rapidly and conveniently by both solution and mechanochemical synthesis, showed remarkable activities in catalytic oxidative desulfurization reactions in both a model diesel environment and in real diesel wherein dibenzothiophene was converted rapidly and quantitatively into dibenzothiophene sulfone.