The offer of gene delivery technologies as a promising approach to treating diverse diseases has revolutionized human medicine during the last two decades. So, the application of suitable vectors, particularly polymers with substrates with unique physicochemical properties for the transfer of targeted genes to logical sites for effective treatment, plays an indispensable role for more personalized medicine and improves the safety profile in response to continuing to use new medical technologies. For this purpose, we synthesized nanocarriers with a two-block cationic hydrogel, magnetic and non-magnetic, based on N-isopropyl acrylamide (NIPAM) and quaternary alkyl ammonium halide salts of DMAEMA (DMAEMAQ) with pH and temperature responsiveness via the free radical polymerization technique. The bulk properties of these co-polymers were characterized by using Fourier transform infrared spectroscopy, 1H NMR spectroscopy, Zeta potential, lower critical solution temperature (LCST), and gel electrophoresis to show the loading of nanoparticles with the gene. In the results, magnetic P[NIPAM-DMAEMAQ] hydrogel showed controllable responsive properties determined by the nature of the cationic charge +24.7 mV incorporated, nanosize around 86.95 and 91.22 nm, and efficiency loaded with the gene more than 95%. As well, the synthesized nanohydrogel exhibited a sharp volume-phase transition in water at a LCST of ∼40 °C. So, the combination of both monomers yielded an interesting system with high transfection efficiency and compliant biocompatibility characteristics, which could effectively achieve gene loading. Also, the magnetic potential of nanohydrogel was determined as a vector to deliver genes to localized sites. Notably, the synthesized combination P[NIPAM-DMAEMAQ] nanohydrogel has been considered a transfection of the biodegradable and biocompatible magnetic nanoparticle sensitive to tunable pH and temperature responsiveness, demonstrating that it will hold a promising approach as a potential carrier to improve gene delivery therapeutic efficacy in cancer and different disease treatments.