Heavy metals (HMs) are well-known environmental pollutants that threaten the life forms. The content of HMs in water must be constantly monitored as people are concerned about the ecosystem health, food safety and human health. In this work, a novel green composite consisting of amino acid (AA) and β-cyclodextrin (β-CD) was employed in constructing an electrochemical sensor. The fabricated sensor can be utilized for simultaneous detection of heavy metal ions (HMIs), including cadmium(II) ion (Cd2+) and lead(II) ion (Pb2+), by utilizing the distinctive potential difference between them as the detection signals. Such electrochemical sensor has several merits over the conventional detection approaches due to its portability, flexibility and simplicity. A green approach was used in the preparation of electrode in which β-CD and l-cysteine (Cys) were separately electropolymerized onto the electrode surface without linker in aqueous solution. Electrode fabrication was carried out by layer-by-layer electropolymerization, forming a thin polymeric film with abundant functional groups responsible for anchoring metal ions. Chemical and physical characterizations of modified electrodes were performed to validate the successful synthesis of polymeric film. Under optimal conditions, the developed electrode demonstrated promising simultaneous detection of Cd2+ and Pb2+ in real water samples through square wave anodic stripping voltammetry (SWASV) analysis, with results comparable to conventional methods employing inductively coupled plasma mass spectrometry (ICP-MS). The fabricated sensor revealed sensitivities of 346.26 μAμM-1cm−2 and 250.54 μAμM-1cm−2, and limit of detections (LODs) of 1.13 nM for Cd2+ and 0.53 nM for Pb2+, over the linear ranges of 3.42–700 nM and 1.60–700 nM, respectively. The developed sensor demonstrated a high selectivity, sensitivity, and stability, along with high reproducibility and low LOD over a wide linear range.