• Nanocomposites were synthesized by copolymerization of AM/AMPS in modified NPs dispersions in-situ. • NPs were modified with TMS to incorporate vinyl functional groups on their surfaces. • The behavior of nanocomposite solutions was investigated for oil recovery application. • Adding NPs results in a polymer crosslinking network and a stable solid hybrid system. • Nano-silica makes polymer solutions possess better heat and shear resistance than nano-alumina. Many nanoparticles such as silicon dioxide (SiO 2) and aluminum oxide (Al 2 O 3) have been recently proposed to increase the performance of water-soluble polymers for use in oil recovery (EOR). However, nanoparticles in nanocomposites tend to precipitate, agglomerate, or even precipitate under harsh conditions such as high-temperature and high-salinity (HT-HS), which reduces their potential for field applications. In this work, silica and alumina nanoparticles were modified with 3-methoxysilyl-propyl-methacrylate (TMS) coupling agent containing a vinyl group to enhance better dispersibility in reaction media and much stronger adhesion with the polymer. Then, acrylamide (AM) and 2-acrylamido-2-methyl-1-propanesulfonic acid (AMPS) monomers were copolymerized in the presence of modified NPs via radical polymerization and were covalently bound to the NPs. In this study, the effect of AM/AMPS ratio and alumina as well silica loading amount on thermal stability, rheological properties and aging of composite solution was investigated and compared with commercial HPAM used for EOR. Results depicted that used method of synthesis could improve the rheological properties and better dispersion of nanoparticles in the polymer. It was found that the modified nanoparticles reduced the thermal degradation of the polymer and protect its original structure when compared to the neat copolymer. After 30 days of aging, the loss of viscosity in PAMS and HPAM was approximately 46% and 75% while PAMS10-Silica2% and PAMS10-Alumina2% exhibited a viscosity loss of 27%. [ABSTRACT FROM AUTHOR]