Recently, imidazole-based ionic liquid supported membranes have found wide application in gas separation and purification, deriving of their good solubility for CO2 and their ultrathin membrane thickness. Our previous works preliminarily showed that three primary interactions, including the interaction between passing gas and ionic liquid, the interaction between anion and cation of ionic liquid, as well as the interaction between ionic liquid and supporting membrane, play crucial roles determining the gas permeability and CO2 selectivity over N2. However, a systematic discussion of these three interactions to disclose the underlying separation mechanism is lack. In this study, adopting molecular dynamic (MD) simulation and density functional theory (DFT) calculation, three ionic liquids including of [BMIM][BF4], [BMIM][PF6] and [BMIM][Tf2N] with high CO2 solubility are selected as research objects, these three interactions were discussed to reveal the gas separation mechanism in MoS2-SILM. Simulation results indicate that the interaction between gas molecules and ILs determines the gas solubility and selectivity, and the [BMIM][BF4] shows superior separation performance over other two ILs. In addition, the interaction between ILs and MoS2 sheets, together with the interaction between cation and anion of ILs, determine the layered structure of confined ILs, which is preferential for gas transport. Furthermore, the gas permeability difference between confined ILs and bulk ILs, and the influence of interlayer spacing were also discussed. Our study provides fundamental insight to the underlying gas separation mechanism and beneficial guidelines for device design.