• Graphene oxide/graphene-based sensor was prepared by atomic layer oxidation. • The sensor can detect sulfamethoxazole with high sensitivity, selectivity and stability. • The sensitivity and limit of detection were enhanced by adding a cationic surfactant. Sulfamethoxazole (SMX) can produce many side effects in the human body and several hematological abnormalities. Therefore, the analytical determination of SMX in pharmaceutical formulations and biological fluids is essential. A biocompatible composite of graphene oxide/graphene (GO/G) layered structure was synthesized to develop electrochemical biosensors for SMX detection. Two layers of single-layer graphene grown by chemical vapor deposition were stacked and annealed to form bilayer graphene (BLG). The BLG was modified by a low-damage plasma treatment—atomic layer oxidation. The top graphene layer was modified to graphene oxide, while the bottom graphene layer was conserved to safeguard its conductive properties and form a layered composite on an indium tin oxide (ITO) substrate. The GO/G layered composite on the ITO glass substrate, plasma-treated for 15 min exhibited optimized redox properties, with a relatively low charge-transfer resistance. At pH 6, the relationship between the oxidation peak current and the SMX concentration (0.1–50 μM) was linear with a sensitivity of 0.262 μA/μM. With the addition of cetylpyridinium chloride, the sensing performance of the GO/G-based electrochemical sensor was ameliorated to 0.529 μA/μM. The GO/G electrode also exhibited high selectivity and stability to SMX.