Adsorption of dyes on solid surfaces has been given considerable interest as one of the most efficient water treatment procedures owing to their low cost, simplicity, recyclability and adsorption efficiency. In this contribution, we report a simplified synthetic route of a novel bipyridinium-based viologen polymer from the polymerization of a viologen-based dialdehyde with aryl-based dihydrazide in an acidic aqueous solution. The developed polyviologen was exposed to the simple freeze-drying process to introduce the corresponding fibrous-like aerogel with high surface area. The chemical structure of the acylhydrazone-based viologen polymer (AHVP) was fully characterized using different spectroscopic techniques. AHVP displayed excellent affinity to form assembled hydrogel. Interestingly, the produced polymers introduced AHVP-linked covalent organic hydrogel framework that is organized in the form of nanofibers. Due to large surface area and surface functionalization, the ability of the active freeze-dried AHVP to adsorb Reactive Blue 19 (RB19) from an aqueous solution worth to be examined. Fourier-transform infrared (FTIR) spectroscopy, energy-dispersive X-ray spectroscopy (EDX), scanning electron microscope (SEM), and UV–Vis absorption spectra were utilized to examine the aerogel surface morphology of the three-dimensional metal–organic viologen framework before and after adsorption of Reactive Blue 19.