Photoreactive and thermoresponsive N-isopropylacrylamide (NIPAM)-surfmer copolymer hydrogels containing 4,4'-di(6-sulfato-hexyloxy)azobenzene (DSHA) dianions are described. The functional hydrogels are obtained in a two steps. First a micellar aqueous solution of (11-(acryloyloxy)undecyl)trimethylammonium bromide (AUTMAB) and NIPAM is exposed to (60) Co-gamma irradiation, and a thermoresponsive copolymer gel is obtained. Second, DSHA is included by shrinking the gel at 50 °C and subsequent reswelling in an aqueous solution of DSHA disodium salt at 20 °C. Reswelling is accompanied by electrostatic adsorption of DSHA dianions at the positively charged AUTMAB headgroups replacing the bromide ions. Gels containing trans-DSHA are transparent yellow at room temperature (λmax = 370 nm), while gels containing cis-rich DSHA are orange (λmax = 460 and 330 nm). Energy dispersive X-ray measurements indicate that 41% of the bromide ions are exchanged if trans-DSHA is used for adsorption, and only 7.5% if cis-DSHA is used. The incorporation of DSHA lowers the lower critical solution temperature (LCST) from 34 to 32 °C. Below the LCST, DSHA can be switched from the trans- to the cis-rich state and vice versa upon irradiation with UV (λ = 366 nm) or visible light (λ ≥ 450 nm). Above the LCST no photoreaction takes place.