A novel dansyl-triazole-based fluorescent macrocycle with high Stokes shift and positive solvatochromism was developed. This is an excellent fluorescence sensor for selective detection of nitro-containing antibiotics and other nitro-heteroaromatics. Detection was possible in real samples/paper strips in submicromolar concentration. The interaction of the macrocycle with multiple proteins exhibited its bioactivity. © 2023 The Royal Society of Chemistry