We demonstrated that room temperature ionic liquids could be used as cavity occupants for modification of the microenvironment of MOF nanocages. Mixed matrix membranes derived from ionic liquid-modified ZIF-8 exhibited remarkable combinations of permeability and selectivity for CO2/N2 and CO2/CH4 separation.This work was published in Angewandte Chemie International Edition, 2015, 54, 15483-15487.