The preparation of flexible electrode, including working electrode (WE) and counter electrode (CE), for dye-sensitized solar cells (DSSCs) utilizing metal oxides using environmentally friendly sustainable TEMPO-oxidized cellulose nanofibers (TOCNFs) is reported in this work. A new type of flexible electrode for the DSSCs, which were made of cellulose nanofiber composites with nickel hydroxide [CNF/Ni(OH) 2 ] substrate films and cellulose nanofiber composites with polypyrrole (CNF/PPY). Nickel hydroxide, Ni(OH) 2 , has been prepared hydrothermally in the presence of TOCNFs, [TOCNF@Ni(OH) 2 ]. Similarly, the conductive polymer substrate has also been prepared from a composite consisting of TOCNF and PPY, TOCNF@ PPY film, by means of polymerization for the CE. Overall, the prepared electrodes both WE from CNF/Ni(OH) 2 substrates and CE from the TOCNF@PPY substrate film were revealed as the novelty of this work and which no one has introduced previously. Although NiO nanoparticles (NPs) coated on the Ni(OH) 2 /TOCNF electrode also produced a good power conversion efficiency, PCE (0.75%); nevertheless, the NiO NP treatment with carbon dots boosted the efficiency up to 1.3%.