Boron and sulfur codoped graphene exhibits exceptional electrochemical sensing capabilities, representing a transformative advancement in the field of electrochemical detection. This study unveils the synergistic impact of boron and sulfur codoping in graphene (BSG) for pioneering nonenzymatic electrochemical sensing of dopamine (DA) and hydrogen peroxide (H₂O₂). The resulting BSG demonstrated enhanced electrochemical properties, including increased surface area, improved charge transfer kinetics, and abundant electroactive sites, making it highly efficient for electrochemical sensing of pharmaceutical compounds, DA and H₂O₂. BSG5/GCE electrode exhibited the best electrochemical behaviour towards DA and H2O2 with 1.98 nM and 1.06 μM within 0-100 μM and 1–10 mM wide linear detection ranges, respectively. High recovery rates ranging from 96.87% to 104.6% in real pharmaceutical samples of DA and H₂O₂, combined with excellent reproducibility, the sensor proves to be highly suitable for practical detection applications. The interaction between S and B atoms boosts charge transfer, improving the adsorption and sensing efficiency of DA and H2O2. Thus, these findings highlight the potential of BSG-based electrochemical sensors for bioanalytical and pharmaceutical applications.