In particular, with the increasing demand for efficient energy usage, energy-saving buildings using EC smart windows have garnered the most attention. This is because the EC smart windows are capable of regulating the transmission of visible and near-infrared light under potential bias, allowing building energy use savings up to 40%. [1a,2] To meet this application need, developing highly efficient ECDs is in great demand. So far, a broad variety of EC materials have been explored in recent years, including metal oxides (WO 3 , V 2 O 5 , and NiO), [3] metal complexes (Prussian blue), [4] small molecules (viologen and its derivatives), [5] and conducting polymers (polypyrrole, polythiophene, and polyaniline). [6] Typically, WO 3 has been widely investigated as a known inorganic EC material due to its excellent stability, fast switching speed, high coloration contrast, and low energy consumption. [7] Over the past decades, significant improvements in the performance have been a result of producing amorphous and nanostructured WO 3 to realize high porosity and active surface area, which can Electrochromic devices (ECDs) have emerged as a unique class of optoelectronic devices for the development of smart windows. However, current ECDs typically suffer from low coloration efficiency (CE) and high energy consumption, which have thus hindered their practical applications, especially as components in solar-powered EC windows. Here, the high-performance ECDs with a fully crystalline viologen-immobilized 2D polymer (V2DP) thin film as the color-switching layer is demonstrated. The high density of vertically oriented pore channels (pore size ≈ 4.5 nm; pore density ≈ 5.8 × 10 16 m -2 ) in the synthetic V2DP film enables high utilization of redox-active viologen moieties and benefits for Li + ion diffusion/transport. As a result, the as-fabricated ECDs achieve a rapid switching speed (coloration, 2.8 s; bleaching, 1.2 s), and a high CE (989 cm 2 C -1 ), and low energy consumption (21.1 µW cm -2 ). Moreover, it is managed to fabricate transmission-tunable, self-sustainable EC window prototypes by vertically integrating the V2DP ECDs with transparent solar cells. This work sheds light on designing electroactive 2D polymers with molecular precision for optoelectronics and paves a practical route toward developing self-powered EC windows to offset the electricity consumption of buildings.The ORCID identification number(s) for the author(s) of this article can be found under