In this research, we present a novel design protocol for the in-situ synthesis of MgAl layered double hydroxide-copper metal–organic frameworks (LDH-MOFs) nanocomposite based on the electrocoagulation process and chemical method. The overall goal in this project is the primary synthesis of para-phthalic acid (PTA) intercalated MgAl-LDH with Cu (II) ions to produce the paddle-wheel like Cu-(PTA) MOFs nanocrystals on/in the MgAl-LDH structure. The physicochemical properties of final product; Cu-(PTA) MOFs/MgAl-LDH, were characterized by the surface analysis and chemical identification methods (SEM, EDX, TEM, XRD, BET, FTIR, CHN, DLS, etc.). The Cu-(PTA) MOFs/MgAl-LDH nanocomposite was used to modification of the carbon paste electrode (CPE); Cu-(PTA) MOFs/MgAl-LDH/CPE. The electrochemical performance of Cu-(PTA) MOFs/MgAl-LDH/CPE was demonstrated through the utilization of electrochemical methods. The results show a stable redox behavior of the Cu (III)/Cu (II) at the surface of Cu-(PTA) MOFs/MgAl-LDH/CPE in alkaline medium (aqueous 0.1 M NaOH electrolyte). Then, the Cu-(PTA) MOFs/MgAl-LDH/CPE was used as a new electrocatalyst toward the oxidation of formaldehyde (FA). Electrochemical data show that the Cu-(PTA) MOFs/MgAl-LDH/CPE exhibits superior electrocatalytic performance on the oxidation of FA. Also the diffusion coefficient, exchange current density (J°) and mean value of catalytic rate constant (Kcat) were found to be 1.18 × 10–6 cm2 s−1, 23 mA cm-2 and 0.4537 × 104 cm3 mol−1 s−1, respectively. In general, it can be said the Cu-(PTA) MOFs/MgAl-LDHs is promising candidate for applications in direct formaldehyde fuel cells.