Covalent organic frameworks (COFs), featuring structural diversity, permanent porosity, and functional versatility, have emerged as promising electrode materials for rechargeable batteries. To date, amorphous polymer, COF, or their composites are mostly explored in lithium-ion batteries (LIBs), while their research in other alkali metal ion batteries is still in infancy. This can be due to the challenges that arise from large volume changes, slow diffusion kinetics, and inefficient active site utilization by the large Na+ or K+ ion. Herein, microwave-assisted imide-based 2D COF, TAPB-NDA covalently connected with amine-functionalized carbon nanotubes (TAPB-NDA@CNT) targeting the application in both Li-/Na-ion batteries, is synthesized. As-synthesized, TAPB-NDA@CNT50 displays the good performance as LIB cathode with a specific capacity of ≈138mAhg-1 at 25mAg-1, long cycling stability (81.2% retention after 2000 cycles at 300mAg-1), with excellent reversible capacity retention of ≈79.6%. Similarly, TAPB-NDA@CNT50, when employed in sodium-ion battery (SIB), exhibited 136.7mAhg-1 specific capacity at 25mAg-1, retained ≈80% of the reversible capacity after 1000 cycles at 300mAg-1 and showing excellent rate performance. The structural advantage of TAPB-NDA@CNT will encourage researchers to design COF-based cathodes for the alkali ion batteries.