As one important crude oil recovery method, gas miscible flooding was widely adopted for EOR. However, the effect of crude oil components, injecting gas types, and pressure on miscible performance were scarcely discussed. In this work, molecular dynamics simulation method was employed to investigate the miscible mechanism of four-components crude oil in injecting gases of CO2 and CH4, respectively. The driving force and hindrance force in oil and gas miscible process was discussed to uncover the underlying miscible mechanism. The driving force mainly comes from the interaction between oil and gas, which induces the interdiffusion between oil and gas. The repulsive force stems from the association of oil components, which inhibits the dissolution of oil out of the crude oil colloidal structure. Furthermore, one evaluation standard of miscibility degree oil in gas was proposed based on solubility capability of oil component in injecting gas. Simulation results indicate the CO2 have better miscibility than that of CH4, and the miscibility of four crude oil components follows order of saturates > aromatics > resins > asphaltenes. The miscibility of all four oil components improves with increasing pressure. It is interesting that the miscibility of asphaltene is insensitive to pressure. Our work provides molecular level insight into the oil gas miscible behavior based on multiple components crude oil, and provide quantitative evaluation on miscibility of each oil component. These simulation results might be helpful to theoretical guidance for gas injection development.