A nitrogen-rich covalent organic framework (COF) was employed to eliminate methylene blue dye from water samples. This COF was synthesized through a straightforward method. Characterization of COF surface has been done by FT-IR, SEM, and BET methods. Various experimental procedures, including the amount of COF, agitation time, and pH, were optimized. The maximum adsorption was obtained at pH of 10.0. The experimental data were fitted by Langmuir, Freundlich, and Sips models, and Freundlich isotherm showed the best fitting. The maximum capacity was 65.77 mg analyte per g of adsorbent. The desorption process was also discussed, and methanol was selected as the most suitable desorption solvent. It was notable that both adsorption and desorption of dye from COF were relatively fast and a short period of these processes had significant practical consequences.