Environmental pollution caused by various industries has contributed to water contamination which threatens human life worldwide. Thus, investigation of affordable and efficient technologies to deal with the challenge of water purification is critical. Metal-organic frameworks (MOFs) and covalent organic frameworks (COFs) with tunable backbones and functionalities offer excellent opportunities in the field of water remediation. In this review, we describe the targeted design of MOFs and COFs as well as some key issues related to tuning the structures and boosting the stability of these materials for adsorptive, catalytic and extractive removal of organic dyes in water. Furthermore, we provide an overview of the reported approaches in this field and present strategies for selective removal of the pollutants by taking the advantage of the framework features of MOFs and COFs. In addition, the regeneration of these networks after the removal process and their advantages over conventional catalysts for cleaning water are represented. Finally, we expect the current review gives some insight into tailoring the structure of MOFs and COFs for water remediation.