Molecular simulations were carried out to understand the structural features and the sorption and diffusion behavior of methane and carbon dioxide in amorphous poly(alkyl acrylates) in the temperature range of 300-600 K. The hybrid Monte Carlo/molecular dynamics approach was employed to address the effects of polymer swelling and framework flexibility on the gas sorption. Simulations show that the glass-transition temperature decreases with the side-chain length of poly(alkyl acrylate), consistent with experiments. This is due to the fact that the shielding of the polar ester groups increases with the side-chain length. The simulated sorption isotherms for methane and carbon dioxide were in agreement with the experimental data. The polymer swelling becomes more pronounced, especially in the case of sorption of carbon dioxide. A significant swelling occurs, possibly because of the greater interaction between carbon dioxide and the polar ester groups in the polymers. The uptake of methane and carbon dioxide by poly(alkyl acrylates) generally increases with the side-chain length. Our simulations confirm the experimental findings that the diffusion coefficients of methane and carbon dioxide in poly(alkyl acrylates) increase with the side-chain length. Interestingly, the activation energies of gas diffusion decrease with the side-chain length. The diffusion coefficients of the penetrants have an exponential relationship with the void fraction, which is in agreement with the free volume theory.