Halide perovskite has shown great potential in photocatalysis owing to its diversity, suitable energy band alignment, rapid charge transfer, and excellent optical properties. However, poor stability, especially under humid conditions, hinders their practical application in photocatalysis. In this work, we report the encapsulation of inorganic–organic hybrid perovskite QDs into MIL-101(Cr) through an in situ growth strategy to prepare a series of MAPbBr3@MIL-101(Cr) (MA = CH3NH3+) composites. The perovskite precursors, i.e., MABr and PbBr2, were successively introduced into the pores of MOF, where the perovskite quantum dots were self-assembled in the confined environment. In photocatalytic CO2 reduction, 11%MAPbBr3@MIL-101(Cr) composite displayed the best performance among the composites with a total CO and CH4 yield of 875 μmol g−1 in 9 h, which was 8 times higher than that of the pure MAPbBr3. Such high gas production efficiency could be maintained for 78 h at least without structural and morphologic decomposition. The remarkable stability and catalytic activity of composites are mainly due to the synergistic effect and improved electron transfer between MAPbBr3 and MIL-101(Cr). Moreover, these composites revealed a novel mechanism, showing switched CH4 selectivity with the controlling of the perovskite location and contents. Those with perovskites encapsulated in the mesopores of MIL-101(Cr) were more preferential for CO production, while those with perovskites encapsulated in both meso- and micropores could produce CH4 dominantly.