Designing cheap and efficient nanoporous catalysts to improve the efficiency of catalytic processes is a very attractive and challenging area. Herein, a metal-organic framework (MOF) based novel porous nanocatalyst was prepared via a multi-step post-synthetic modification approach. Initially, the Cr-MIL-101-NH2 was modified with cyanuric chloride and then melamine, respectively. Next, the modified MOF was used as the support for the immobilization of cobalt (II) ions to form the MIL-101-NH2-CC/melamine@Co2+ catalyst. The structure and morphology of the catalyst were characterized using powder XRD, FT-IR, FE-SEM, EDX, elemental mapping, TGA, and N2 adsorption-desorption isotherm analysis. The catalytic performance of MIL-101-NH2-CC/Melamine@Co2+ was evaluated by one-pot synthesis of 2,4,5-trisubstituted imidazole derivatives according to Debus–Radziszewski reaction from different aldehydes, benzil, and ammonium acetate under solvent-free conditions. Moreover, the MIL-101-NH2-CC/Melamine@Co2+ catalyst demonstrated significant catalytic activity in the methylene blue dye reduction, with a reduction time of 14 min and a rate constant (k1) of 0.0141 min− 1. The catalyst was recycled and reused four and seven times in the synthesis of 2,4,5-trisubstituted imidazole and the reduction reaction with appropriate catalytic activity.