Novel fluorescent acrylamide hydrogel containing dansyl moiety (DNS-gel) was synthesized via free-radical photopolymerization of acrylamide/N,N-methylenebisacrylamide by using dansyl chloride as a photoinitiator. DNS-gel presented dual-fluorescence emission when excited at 344nm in acetonitrile:water (1:1) solvent system due to twisted intramolecular charge transfer between dimethylamino and naphthalene units in the dansyl moiety. Synthesized fluorophore containing gel was utilized as a fluorescent sensor against specific metal ions (Pb2+, Hg2+, Co2+, Cd2+, Mn2+, and Zn2+) and nitroaromatic compounds [1,2-dinitrobenzene, 2,4,6-trinitro-1-phenol [picric acid (PA)], 4-nitrophenol, 2,4,6-trinitrotoluene, 2,4-dinitrophenol (2,4-DNP), and 2-nitrotoluene]. Fluorescence intensity of DNS-gel was diminished by degrees upon the infusion of metal ions and nitroaromatics. For all compounds, the greatest quenching effectiveness was attained in the presence of Co2+ (72.56%), PA (88.55%), and 2,4-DNP, suggesting that DNS-gel could be employed as a potential Co2+, PA, and 2,4-DNP chemical probes. (c) 2018 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2019, 136, 47096.