Covalent organic frameworks (COFs) are new generation of porous materials constructed from light elements (such as carbon, oxygen and nitrogen) linked via covalent bonds. Herein, one-pot synthesis of the composite of a COF and two-dimensional (2D) nanomaterials (graphene oxide (GO), graphitic carbon nitride (g-C3N4), and boron nitride (BN)) was reported. Melamine is poly-condensed with terephthaldehyde in the presence of GO, g-C3N4, and BN leading to the formation of a series of highly cross-linked microporous hierarchical porous amine networks. The thermal behavior, surface morphology, and crystalline structure were studied using thermogravimetric analysis (TGA), differential thermal analysis (DTA), scanning electron microscopy (SEM), X-ray diffraction (XRD), and transmission electron microscopy (TEM). The prepared COF nanocomposites possessed a high surface area of 42-509 m2 g−1 with a hierarchical porous structure and high thermal stability. COF nanocomposites (COF@GO, COF@g-C3N4, and COF@BN) were explored as an adsorbent for dye removal anionic dyes (Eosin dye and fluorescein) and cationic dyes (Fuchsine, and methylene blue). The composite materials exhibit high adsorption efficiency of 100% with excellent selectivity compared to the pristine COF. The synergic effect of COF and 2D nanomaterials improves the adsorption performance of the materials.