In this study, silver nanoparticle embedded on guar gum (AgNP/GG) nanocomposite was synthesized thoroughly in greenway via a simple in situ method by silver salt reduction using the guar gum (GG) polymer matrix. The highly water-soluble polysaccharide material (GG) was served as both stabilizing and reducing agent. Its structure and morphology were characterized by XRD, FT-IR, TEM, and UV−Vis spectroscopy. EIS, CV, and DPV methods have also been employed to investigate the electrochemical performance of the AgNP/GG nanocomposite. Analytical parameters such as loading amount of catalyst, scan rate, pH value, cyclic stability, repeatability, and reproducibility were optimized. The AgNP/GG/SPCE shows a distinct electrocatalytic oxidation of diphenylamine (DPA) in a wide linear range (WLR) of 0.01−9.09 µM, a higher sensitivity of 6.879 µM cm−2, and a limit of detection (LoD) of 5.4 nM (S/N = 3). The fabricated electrode exhibits an outstanding electrocatalytic performance in terms of good reproducibility, high stability, and acceptable anti-interference ability. In addition, this work advances the feasibility to determine DPA in apple juice sample with satisfactory recovery results.