In order to propose an alternative for the sensors made with complex materials, a cheap and facile electrode material based on the preparation of activated carbon from cocoa pods (Theobroma cacao) has been proposed for the electroanalysis of xanthine (Xa). Raw cocoa pods (RCP) and activated carbon cocoa pods (ACCP) were prepared and characterized by pH at the zero point of charge, FTIR, SEM/SEM‐mappings, EDX, XRD, Raman spectroscopy, BET/BJH analysis, 13C NMR, and TGA/DSC. RCP and ACCP were drop coated on the surface of a glassy carbon electrode (GCE) and characterized by cyclic voltammetry and electrochemical impedance spectroscopy. The electrodes GCE/RCP and GCE/ACCP were used through differential pulse voltammetry to optimize the different parameters that can affect the determination of Xa and a calibration curve has been plotted in the range from 1.0 to 12.0 μM, leading to a detection limit of 0.264 μM. The interference, reproducibility, and stability were evaluated and the sensor was successfully applied in fresh fish sample. Therefore, the simple way of preparation of ACCP and the significant role played by GCE/ACCP in resolving the oxidation of Xa is expected to impact significantly the future sensor research through substitution of the costly and hazardous materials.