CO2 and N2 injection is an effective enhanced oil recovery technology in the oilfield especially for low-permeability and extra low-permeability reservoirs. However, these processes can induce an asphaltene deposition during oil production. Asphaltene-deposition-induced formation damage is a fairly severe problem. Therefore, predicting the likelihood of asphaltene deposition in reservoir conditions is crucial. This paper presents the results of flash separation experiments used to investigate the composition of crude oil in shallow and buried-hill reservoirs. Then, PVTsim Nova is used to simulate the composition change and asphaltene deposition of crude oil. Simulation tests indicate that the content of light components C1-C4 and heavy components C36+ decrease with increasing CO2 and N2 injection volumes. However, the extraction of CO2 is significantly stronger than that of N2. In shallow reservoirs, as the CO2 injection volume increases, the deposition pressure range decreases and asphaltenes are easily deposited. Conversely, the asphaltene deposition pressure of crude oil injected with N2 is higher and will not cause serious asphaltene deposition. When the CO2-N2 injection ratio reaches 1:1, the deposition pressure range shows a significant transition. In buried-hill reservoirs, asphaltene deposition is unlikely to occur with CO2, N2, and a gas mixture injection.