The formation heterogeneity is considered as one of the major factors limiting the application of foam flooding. In this paper, influences of formation properties, such as permeability, permeability distribution, interlayer, sedimentary rhythm and 3D heterogeneity, on the mobility control capability and oil displacement efficiency of foam flooding, were systematically investigated using 2D homogeneous and 2D/3D heterogeneous models under 120 °C and salinity of 20 × 10 4 mg/L. The flow resistance of foam was promoted as the permeability increased, which thus resulted in a considerable oil recovery behavior. In the scenario of the vertical heterogeneous formations, it was observed that the permeability of the high-permeable layer was crucial to foam mobility control, and the positive rhythm appeared favorable to improve the foam flooding performance. The additional oil recovery increased to about 40%. The interlayer was favorable for the increases in mobility reduction factor and oil recovery of foam flooding when the low permeability ratio was involved. For the 3D heterogeneous formations, foam could efficiently adjust the areal and vertical heterogeneity through mobility control and gravity segregation, and thus enhancing the oil recovery to 11%-14%. The results derived from this work may provide some insight for the field test designs of foam flooding.