Their unique layered structure, large specific surface area, good stability, high negative charge density between layers, and customizable composition give layered double hydroxides (LDHs) excellent adsorption and detection performance for heavy metal ions (HMIs). However, their easy aggregation and low electrical conductivity limit the practical application of untreated LDHs. In this work, a ternary MgZnFe-LDHs engineered porous biochar (MgZnFe-LDHs/PBC) heterojunction was proposed as a sensing and adsorption material for the effective detection and removal of Cd2+ from wastewater. The growth of MgZnFe-LDHs in the PBC pores not only reduces the accumulation of MgZnFe-LDHs, but also improves the electrical conductivity of the composite. The synergistic effect between MgZnFe-LDHs and PBC enables the composite to achieve a maximum adsorption capacity of up to 293.4 mg/g for Cd2+ in wastewater. Meanwhile, the MgZnFe-LDHs/PBC-based electrochemical sensor shows excellent detection performance for Cd2+, presenting a wide linear range (0.01 ng/L–1 mg/L), low detection limit (3.0 pg/L), good selectivity, and stability. The results indicate that MgZnFe-LDHs/PBC would be a potential material for detecting and removing Cd2+ from wastewater.