In order to develop a more efficient "Molecular Basket" sorbents (MBS), it is necessary to fundamentally understand the sorption mechanism. A computational chemistry approach to the sorption of CO2 and H2S on polyethylenimine (PEI) was conducted. The sorption conformations of CO2 and H2S on the potential sites in PEI were examined, and the heats of sorption and the diffusion barrier of the sorbates from site to site in the bulk of PEI were estimated. The results show clearly that the thermodynamics prefers the sorption of CO2 to the sorption of H2S on PEI, while the kinetics favors the transfer of the sorbed H2S rather than the sorbed CO2 in the PEI bulk. These findings have been used successfully to explain the phenomena observed in the experiments and resulted in a proposal of an innovative process for separation and removal of CO2 and H2S, respectively, using MBS.