As a method to enhance oil recovery,the stability of foam injection and the improvement of foam migration from fracture to matrix have been two major problems in the field of foam injection in fractured reservoirs.3-aminopropyl triethoxysilane(APTES)was used to modify silica nanoparticles to stabilize carbon dioxide foam,and FTIR analysis and contact angle measurement were selected to characterize foam generation and stability.The experiment was conducted with different mass fractions of NPs(0.04%~0.20%),two mass fractions of SDS(0.236%~0.472%),and the presence and absence of MgCl2 salt.The results showed that after surface modification of silica by APTES,the nanoparticles were more oil-philic in oil-water system and more gas-philic in air-water system.This,in turn,the migration of the modified silica(MS)to the water-gas interface was amplified to enhance the stability of the CO2 foam.Foam stability experiments confirmed the existence of this mechanism,and switching the foam stabilizer from silica to MS nanoparticles resulted in a 33.3%increase in the maximum foam half-life.Foam property was not affected by NPs type.However,the foamability was reduced due to the surface adsorption of SDS on the nanoparticle surface.