A green and novel composite material integrating graphitic carbon nitride (g-C₃N₄) with layer double hydroxide CaFe-LDH has been developed for detecting Cd(II) ions in food and environmental samples using dispersive solid-phase microextraction (DSPME) method by flame atomic absorption spectroscopy. CaFe-LDH@g-C₃N₄ was synthesized via hydrothermal co-precipitation. The nanocomposite was characterized using various analytical techniques including FTIR, FESEM, XRD and EDX. Optimal conditions were set as pH 8, 15 mg adsorbent, 60 s adsorption time, 30 s desorption time, sample volume 25 mL and eluent volume 2 mL using 0.5 M HNO₃. The method shows low limit of detection (0.04 μg/L), limit of quantification (0.13 μg/L), and preconcentration and enrichment factor 12.5 and 12.32, respectively. It asserts high precision with a relative standard deviation under 10 % and an extraction efficiency of 101.4 %. The accuracy was validated using certified reference materials (CRMs), demonstrating the composite material effectiveness in quantifying Cd(II) concentrations across different matrices.