CO2 injection enhanced oil recovery has become one of the most important approaches to develop heavy oil from reservoirs. However, the microscopic displacement behavior of heavy oil in the nanochannel is still not fully understood. In this paper, we use CO2 as the displacing agent to investigate the displacement of heavy oil molecules confined between the hydroxylated silica nanochannel by nonequilibrium molecular dynamics simulations. We find that for heavy oil molecules, it requires more much higher displacing speed to fully dissipate the residual oil which is found related to the decreased CO2 adsorption on the silica nanochannel. A faster CO2 gas injection rate will lower the CO2 adsorption inside the nanochannel, and more CO2 will participate in the displacement of the heavy oil. The results from this work will enhance our understanding of the CO2 gas displacing heavy oil recovery and design guidelines for heavy oil recovery applications.