The stable maintenance effect of a chemical oil displacement agent on a foam liquid film usually creates problems with the oilfields surface system. To achieve comprehensive insights into the influence mechanism of these chemical agent components on the foam liquid film, an "SDBS/HPAM/OH-" water-based foam simulation system and corresponding control systems were constructed by adjusting the categories and quantities of component molecules by molecular dynamics (MD) simulation. The simulated results indicated that the foam stability follows the order of "SDBS/HPAM/OH-" system > "SDBS/HPAM" system > "SDBS" system. The smaller the inclination angle of the SDBS molecular tail chain, the greater the tendency of the SDBS molecular configuration to be "upright" at the gas-liquid interface, which is not conducive to preventing the aggregation and penetration of gas molecules at the gas-liquid interface. Although the presence of HPAM molecules can significantly enhance the stability of the liquid film by restricting the liquid film's drainage and the diffusion of gas molecules, the addition of HPAM molecules would weaken the formation ability of the foam liquid film. Through decreasing the aggregation of cations around the co-adsorption layer, OH- not only enhances the interfacial activity of SDBS molecules, but also reduces the electrostatic repulsion between -COO- groups on the HPAM molecular chain, which makes the foam more stable. With an increase in the pH, SDBS concentration, and HPAM concentration, the stability of foam liquid film was strengthened. These results are helpful in facilitating new insights into the formation and stabilization mechanism of water-based foams. In particular, they provide support for the development and application of new defoaming technologies.