Atomistic molecular dynamics simulations were carried out to obtain the diffusion coefficients of CO2 in n-hexane, n-decane, n-hexadecane, cyclohexane and squalane at temperatures up to 423.15 K and pressures up to 65 MPa. Three popular models were used for the representation of hydrocarbons: the united atom TraPPE (TraPPE-UA), the all-atom OPLS, and an optimized version of OPLS, namely L-OPLS. All models qualitatively reproduce the pressure dependence of diffusion coefficient of CO2 in hydrocarbons measured recently, and L-OPLS was found to be the most accurate. Specifically for n-alkanes, L-OPLS also reproduced the measured viscosities and densities much more accurately than the original OPLS and TraPPE-UA models, indicating that the optimization of the torsional potential is crucial for the accurate description of transport properties of long chain molecules. The three force fields predict different microscopic properties such as mean square radius of gyration for the n-alkane molecules and pair correlation functions for the CO2 -n-alkane interactions. CO2 diffusion coefficients in all hydrocarbons studied are shown to deviate significantly from the Stokes-Einstein behavior.