The existence of noncondensable gases has a great effect on the condensation heat transfer coefficient. It is necessary to exclude noncondensable gases and maintain the vacuum degree to improve heat transfer in some industrial phase-change heat exchangers. Nevertheless, to better control the temperature needed to increase thermal resistance to decrease or adjust the heat transfer, using noncondensable gases is an effective method. Understanding heat transfer and dynamics characteristics of noncondensable gases at nanoscale are of great interest in both theoretical and practical applications. In the present study, the influence of noncondensable gases to phase change in confined nanoscale space was investigated by using molecular dynamics simulation. Vapor nitrogen was used as the noncondensable gas put into the working fluid region that contains the liquid and vapor water. The temperature and distribution of the density of working fluid was obtained and the trajectories of some water molecules and nitrogen molecules were tracked. As time passes, more and more water molecules condense at the cold wall, whereas a certain number of nitrogen molecules fluctuate in the working fluid region beside the accumulated nitrogen molecules at the cold end to resist the heat transfer and increase the temperature difference. The results revealed the influence of noncondensable gases to phase change from the nanoscale aspect. The enhancement of heat transfer could be realized and controlled through the regulation of the noncondensable gases in the working fluid.