AbstractThe complex [Cd(PDNDI)]·DMF (Cd‐PDNDI) (H2PDNDI = N‐(4‐pyridine)‐4,5‐dicarboxy‐1,8‐naphthalene dicarboxyimide) was synthesized by the reaction of N,N′‐di(4‐pyridyl)‐1,4,5,8‐naphthalene diimide (DPNDI) and Cd(NO3)2·4H2O. It was characterized by elemental analysis, infrared spectroscopy, ultraviolet–visible (UV‐vis) spectroscopy, powder X‐ray diffraction (PXRD), single crystal X‐ray diffraction, and thermogravimetric analysis. Structural analysis shows that the Cd‐PDNDI has a self‐assembled 3D network structure with the rtl type topology. It is worth mentioning that the composition of the ligand is different from the initial raw material used in this molecular structure. This may be because the ligand undergoes an in situ hydrolysis reaction in the reaction system and becomes an NDI carboxylic acid derivative, which continues to join coordination reaction with the metal ion. In addition, the Cd‐PDNDI has an excellent photocatalytic effect on malachite green (MG) among the six dyes, which shows that the Cd‐PDNDI could be used as a photocatalytic material for the degradation of dyes.