In this paper, water-dispersible and covalently bonded polyaniline-carbon nanostructures, including polyaniline-reduced graphene oxide (PANI-rGO), polyaniline-single-walled carbon nanotubes (PANI-SWCNTs), and polyaniline-reduced graphene oxide/single-walled carbon nanotube (PANI-rGO/SWCNTs) nanocomposites, were synthesized by grafting PANI onto p-phenylenediamine (PPD)-functionalized graphene oxide (GO) or single-walled carbon nanotubes (SWCNTs) using polystyrene sulfonate (PSS) as a macromolecular dopant agent. The structures and morphologies of the PANI, PANI-rGO, PANI-SWCNTs, and PANI-rGO/SWCNTs nanocomposites were characterized by Fourier transform infrared spectroscopy and scanning electron microscopy. The cyclic voltammetry and UV–vis spectra were performed on an electrochemical workstation and a UV–vis spectrometer, respectively. The results show that the electrochromic and electrochemical properties of nanocomposites can benefit from the high conductivity of SWCNTs and the abundant active sites of rGO. When SWCNTs and rGO work together, their respective shortcomings are overcome, allowing the nanocomposite to exhibit the best electrochemical and electrochromic properties. The optical contrast increased from 0.38 for PANI to 0.52 for PANI-rGO/SWCNTs. The coloring and bleaching times decreased from 2.59 s and 2.39 s, respectively, for PANI to 1.33 and 0.78 s, respectively, for PANI-rGO/SWCNTs. The charge transfer resistance (Rct) decreased from 135 Ω for PANI to 30 Ω for PANI-rGO/SWCNTs. The synergistic effect of PANI, rGO, and SWCNTs can significantly improve the electrochromic ability of PANI. Electrochromic properties of covalently bonded polyaniline-reduced graphene oxide/single walled carbon nanotubes nanocomposites. A high performance electrochromic material was prepared using polyaniline (PANI) and two different dimensional carbon nanostructures, single-walled carbon nanotubes (SWCNTs) and reduced graphene oxide (rGO) as the components. The covalent bond was introduced to interface between PANI and two carbon nanostructures to form a three-dimensional conductive network. Owing to the high electron conduction through directly connected covalent bond and loose molecular chain aggregation brought by two various dimensional carbon nanostructure, PANI-rGO/SWCNTs nanocomposites exhibit superior electrochemical and electrochromic properties (high optical contrast and short switching time) compared with PANI.