A new design for an energy-harvesting electrochromic window (EH-ECW) based on the fusion of two technologies, organic electrochromic windows and dye-sensitized solar cells (DSSCs), is presented. Unlike other power-generating smart windows, such as photoelectrochromic devices that are passive and only contain two states (i.e., a closed-circuit colored state and an open-circuit bleaching state), EH-ECW allows active tuning of the transmittance by varying the applied potential and it functions as a photovoltaic cell based on a DSSC. The resulting device demonstrates a fast switching rate of 1 s in both the bleaching and coloring processes through the use of an electrochromic polymer as a counter electrode layer. To increase the transmittance of the device, a cobalt redox couple and a light-colored, yet efficient, organic dye are used. The organic dye contains a polymeric structure that contributes to the high cyclic stability. The device exhibits a power conversion efficiency (PCE) of 4.5% (100 mW cm-2) under AM 1.5 irradiation, a change in transmittance of 34% upon applied potential, and shows only 3% degradation in the PCE after 5000 cycles.