A $\pi$-electron rich supramolecular polymer as an efficient fluorescent sensor for electron deficient nitroaromatic explosives has been synthesized and the role of H-bonding in dramatic amplification of sensitivity/fluorescence quenching efficiency in the solid state has been established. {\textcopyright} The Royal Society of Chemistry 2011.