The in situ activation of silica nanoparticles (NPs) by adsorption of an anionic surfactant, nonylphenol-substituted decylsulfonate (C10-NPAS), has been studied. The mechanism whereby such NPs stabilize foams has been elucidated. Traditional static foam tests were carried out, focusing on the influence of stirring intensity on the stability characteristics of the foams. A freezing method has been applied for the first time to fix aqueous foams, and an anticipated mechanism has been verified. It was found that higher stirring intensity results in a finer foam and thinner foam lamellae, and the distribution of NPs is inhomogeneous therein. The foam stabilizing effect of NPs is more noticeable for thinner foam films. The anticipated mechanism, whereby partial aggregation of nano-SiO2 is beneficial to foam stability, has been verified by observing SEM images. Due to the strong hydrogen bonds interactions, C10-NPAS has the ability to activate NPs in situ and to stabilize negative charge thereon, making it potentially applicable in oilfields. The obtained results may expedite the development of super-long-term stable foams and potential application of NPs in enhanced oil recovery technology.