The A-type sandwich polyoxometalates of [(HOSnIVOH)3(PW9O34)2]12! (P2W18Sn3) and [(OCeIVO)3(PW9O34)2]12! (P2W18Ce3) were immobilized for the first time into the porous metal–organic framework MIL-101(Cr). FT-IR, powder X-ray diffraction, SEM-EDX, ICP analysis, N2 adsorption and thermogravimetric analysis collectively confirmed immobilization and good distribution of polyoxometalates into cages of MIL-101(Cr). The catalytic activities of the homogeneous P2W18Sn3 and P2W18Ce3 and the corresponding heterogeneous catalysts were examined in the oxidation of sulfides to sulfones with H2O2 as the oxidant at room temperature. The effects of different dosages of polyoxometalates, type of solvent, reaction time, amount of catalyst and oxidant in this catalytic system were investigated. The new P2W18Sn3@MIL-101 and P2W18Ce3@MIL-101 nanocomposites exhibited good recyclability and reusability in at least five consecutive reaction cycles without significant loss of activity or selectivity.