The viologen-based gel is typical kind of electrochromic materials, there are currently two main limited problems for application in electrochromic devices (ECD). The electrochromic layer may be damaged due to aging, film stress, etc., or viologen dimerization occurs after repeated service cycles, which have a significant impact on the reliability of ECD. To address these limitations, we synthesized benzyl boronic acid viologen (BBV) and mixed it with an electrolyte containing polyvinyl alcohol (PVA). The boronic acid group in BBV can form boronic ester linkages with the hydroxyl group in PVA, resulting in a self-healing all-in-one electrochromic gel. The immobilized viologen with boronic ester linkages would slow down its diffusion rate and effectively mitigate its poor cycling stability caused by dimerization. Meanwhile, the reversibility of the dynamically cross-linked boronic ester linkages leads to self-healing ability of the electrochromic gel. The all-in-one electrochromic gel demonstrated excellent mechanical properties, with a tensile strength of 33 kPa, and significant self-healing performance within 30 min at room temperature, with a healing efficiency of 96.57%. The ECD prepared using this gel exhibited excellent properties, with a response time of 3.9 s for coloring and 7.4 s for bleaching at a driving voltage of 0 to 1.3 V, as well as good optical contrast (71.33%) and high cycling stability (10,000 cycles/82.66%).