One of the commonly used tool in enhance oil recovery (EOR) is nitrogen foam flooding. The sweeping efficiency is largely determined by the foam stability. Recently the study on using nanoparticle, alone or with other chemicals, to stabilize foam has emerged in several fields of foam application. In this study, we use a combination of physicochemical tools to analyze the synergetic effect of ionic liquid cetylpyridinium chloride (CPC) with nanoparticle in foam flooding of EOR. Two different nanoparticles (NPs), one hydrophilic and the other hydrophobic, are compared in terms of sweeping efficiency. It was found that CPC with hydrophilic NPs is much more effective in foam flooding residue oil than with hydrophobic NPs. This may be due to the difference in CPC orientation on NP surfaces, thus affecting the surface properties including surface tension, elasticity and contact angle. Consequently the stability of foam, which underpins the oil displacement efficiency in EOR, is influenced. The possible interaction and mechanism between CPC, NP and oil are discussed while considering the contribution from reduction of drainage rate, higher particle adsorption energy, and higher surface elasticity. Understanding the differential roles of hydrophilic and hydrophobic nanoparticles in ionic liquid stabilized foam as well as physical mechanism underpinning their specificity could help facilitate the development of new green nanomaterial in the application of EOR.