This study presents a novel sulfur-doped graphitic carbon nitride (S@g-C3 N4 ) with a wider potential range as electrocatalyst for electrochemical sensor application. The S@g-C3 N4 nanosheets were successfully prepared with a ball milling method by mixing appropriate molar concentration required precursors. The as-synthesized heteroatom-doped graphitic carbon nitride is characterized by spectroscopic techniques including PL, DRS-UV, FT-IR, and Brunauer-Emmett-Teller equation. The morphological features were studied by FE-SEM and HR-TEM analysis. Chit-S@g-C3 N4 -modified glassy carbon electrode (GCE) was employed for the electrochemical detection of omeprazole (OMZ) use in drug formulations. We have noted an oxidation peak current response at a potential of +0.8 V versus Ag/AgCl in PBS medium (0.1 M, pH 7.0). Differential pulse voltammetry amperometry experimental method can be used to measure the concentration of OMZ for quantitative studies in known samples. Under the optimized experimental condition, the calibration plot was constructed by plotting the peak currents versus OMZ in the linear ranges from 6.0 × 10-7 to 26 × 10-5 M. The linear regression equation is estimated to be Ip (μA) = 0.9518 (C/μM) + 0.3340 with a good correlation coefficient of 0.9996. The lower determination limit was found to be 20 nM and the current sensitivity was calculated (31.722 μA μM-1 cm-2 ). The developed sensor was utilized successfully to determine the OMZ concentration in drug formulations and biological fluids. These results revealed that the Chit-S@g-C3 N4 -modified GCE showed excellent electroanalytical performance for the detection of OMZ at a low LOD, wider linear range, high sensitivity, good reproducibility, long-term storage stability, and selectivity with an acceptable relative standard deviation value.