Effective and simultaneous organic micropollutant and insoluble oil removal from wastewater by using smart materials and feasible strategies is still a huge challenge. Herein, we design a novel two-dimensional (2D) metal–organic framework (MOF) {[Zn3(bcoba)2(H2O)2]·4DMA·2H2O}n (kgd-Zn) (H3bcoba = (3,5-bis((3′-carboxylbenzyl)oxy)benzoic acid)) with a kgd topology by using a reticular chemistry strategy for highly efficiently removing hazardous substances from wastewater. The excellent ciprofloxacin (CIP) adsorption of kgd-Zn may be attributed to the strong interaction forces between pollution molecules and the MOF. In addition, a macroporous melamine foam (MF) supported hybrid composite kgd-Zn@MF is prepared accordingly. The adsorption performance of CIP is significantly optimized due to the hierarchical microporous–macroporous kgd-Zn@MF system. Moreover, the synergetic hydrophobic/oleophilic properties endow the kgd-Zn@MF composite with an exceptional oil/water separation ability, including a high adsorption capacity (5077–13 786 wt%) towards various solvents and oils, easy collection and remarkable recyclability over 50 cycles. Meanwhile, the hybrid kgd-Zn@MF can simultaneously remove CIP molecules and soybean oil from simulated multi-component wastewater and the removal efficiencies reach above 99.0%, exhibiting a dual functional performance. This work presents a promising strategy of oriented design and topological construction of MOF materials and MOF-based composites acting as excellent candidates for purifying drinking water.