Many studies have been performed, and valuable conclusions have been drawn to augment understanding about foam generation process and its impact on ultimate oil recovery. However, the behavior of foam in vertically heterogeneous reservoir remains unresolved. Hence, this challenge creates a need to investigate the matter comprehensively, which essentially is the goal of this study. In this work, the simulation runs were conducted for two configurations of vertical heterogeneity: First, the low-permeable layer is on top of the high-permeable layer. Second, the simulation runs are conducted for “vice versa” configuration. In each configuration, five scenarios were defined to investigate the effect of permeability contrast ratio. Furthermore, for all cases, the comparison was made with the case of gas injection in the absence of foam. The results suggest that foam generation was not beneficial when it was applied in the reservoir with low-permeable layer on top of the high-permeable one. It failed to challenge the conventional gas injection process with respect to case studies developed in the project, as very little, or no strong foam was generated. By contrast, as the foam was generated in the reservoir with high permeability on top with low-permeable layer in the bottom, it succeeded to control the gas–oil ratio and mobility of injected gases quite effectively.