In this study, gold nanoparticles (AuNP) were synthesized using a novel stabilizer based on dialdehyde starch polymer (DAS) and dimethyl sulfoxide (DMSO) and the nanomaterial was applied to develop a sensor for methyldopa detection. The nanoparticles were characterized by transmission electron microscopy and the proposed sensor was electrochemically characterized by electrochemical impedance spectroscopy, chronocoulometry and square-wave voltammetry. Under optimized conditions (0.1 mol L À 1 McIlvaine buffer solution at pH 3.5 and 50 μL AuNP/DAS-DMSO), using square-wave voltammetry, the calibration curve presented a linear range of 0.99 to 19.60 μmol L À 1 , with a detection limit of 0.50 μmol L À 1 . The sensor showed good accuracy, with coefficients of variation of 7.8 % (inter-day; n = 6) and 5.9 % (intra-day; n = 3), and recovery values in the range of 95.3 to 105.2 %. The methyldopa content in a pharmaceutical sample was determined and the results show good correlation with the label value and the method recommended by the Pharmacopoeia, representing a fast and accurate alternative for detecting methyldopa in pharmaceutical products.