Covalent organic frameworks (COFs), as a subclass of crystalline and porous organic polymers, have extraordinary features which privileges the possibility of using them for various applications. In this research, a novel class of N-rich COF based on morpholine and triazine ring was synthesis and evaluating its applications in CO2 adsorption and efficient removal of direct scarlet 4BS as organic dye. First, 2,4-dihydrazino-6-morpholino-1,3,5-triazine as diamine monomer and 2,4,6-tris-(2-methoxy-4-formyl-phenoxy)-1,3,5-triazine as a trialdehyde monomer were synthesized with the ability to condense with each other to create linkages containing carbon–nitrogen double bonds in the framework by solvothermal method. The chemical structurer, morphology, thermal stability, crystallinity, porosity, surface area, type, and amount of surface charge, etc. were examined using FT-IR, TGA, DTG, BET, PXRD, Zeta potential analysis, FE-SEM, EDX mapping analysis, and TEM techniques. During the application evaluation stage, the CO2 gas adsorption capacity of prepared COF at a pressure of approximately 1 bar at room temperature was 21 mg.g−1. Additionally, the framework demonstrated significant capacity for the removal of direct scarlet 4BS under optimal conditions with 600 ppm of adsorbate and 4 mg of prepared COF. By examining the adsorption isotherms and kinetic models, the nature and mechanism of dye removal were better understood. The results followed the Langmuir model and Pseudo-second-order, confirming the chemical adsorption of wastewater pollutant on the framework and the significance of the adsorbate`s adsorption step onto the adsorbent`s site.