Covalent organic frameworks (COFs) having layered architecture with open nanochannels and high specific surface area are promising candidates for energy storage. However, the low electrical conductivity of two-dimensional COFs often limits their scope in energy storage applications. The conductivity of COFs can be enhanced through post-synthetic modification with conducting polymers. Herein, we developed polyaniline (PANI) modified triazine-based COFs via in situ polymerization of aniline within the porous frameworks. The composite materials showed high conductivity of 1.4-1.9×10-2 S cm-1 at room temperature with a 20-fold enhancement of the specific capacitance than the pristine frameworks. The fabricated supercapacitor exhibited a high energy density of 24.4 W h kg-1 and a power density of 200 W kg-1 at 0.5 A g-1 current density. Moreover, the device fabricated using the conducting polymer-triazine COF composite could light up a green light-emitting diode for 1 min after being charged for 10 s.