Thermodynamics, structure, and dynamics of CO2 and SO2 absorption by ionic liquids based on the bis(trifluoromethylsulfonyl)-imide anion, [NTf2]−, and quaternary ammonium cations have been investigated by molecular dynamics (MD) simulations. The effect of ether-functionalized chains of different lengths in the ammonium cations is emphasized. Oxygen atoms of ether functions in the cation compete with oxygen atoms of anions for interactions with gas molecules. The mole fraction of SO2 is larger than CO2 in a given ionic liquid. The calculation of Gibbs free energy of solvation and profiles of potential of mean force across the gas–liquid interface provide a physical picture consistent with structural effects of gas absorption. The potential of mean force for the gas molecules at interface exhibits a minimum, which is about twice deeper for SO2 than CO2, with corresponding effect on residence times of gas molecules in different layers across the interface toward the bulk.