We report the development of three-dimensional (3D) porous sponge-like ionic liquid (IL)–graphene hybrid material by integrating IL molecules and graphene nanosheets via self-assembly process. The as-obtained IL–graphene architecture possesses high surface area, efficient electron transport network and fast charge transfer kinetics owing to its highly porous structure, and unique hydrophilic properties derived from the IL anion on its surface, which endows it with high desire for supercapacitor application. Redox-active polyaniline (PANI) nanorods are further decorated on IL–graphene scaffold by electropolymerization. When utilized as freestanding 3D electrode for supercapacitor, the resultant PANI modified IL–graphene (PANI–IL–graphene) electrode exhibits a specific capacitance up to 662 F g−1 at the current density of 1.0 A g−1, with a high capacitance retention of 73.7% as current densities increase from 1.0 to 20 A g−1, and the capacitance degradation is less than 7.0% after 5000 charge–discharge cycles at 10 A g−1.