Accurate and effective oxaliplatin (OXP) concentration detection is essential for maximizing therapeutic advantages and reducing negative effects of this anti-cancer therapy. Using a nanocomposite-based sensor, we present in this paper a novel method for electrochemical OXP detection. It is made of graphitic carbon nitride (g-C3N4) and titanium dioxide (TiO2) nanoparticles embedded on a glassy carbon electrode (GCE) using the hydrothermal method. The X-ray diffractometer (XRD), scanning electron microscopy (SEM), and X-ray photoelectron spectroscopy (XPS) structural investigations revealed that the g-C3N4-TiO2 nanocomposite material is composed of anatase TiO2 and g-C3N4 phases. Using cyclic voltammetry (CV) and differential pulse voltammetry (DPV) analyses, electrochemical tests demonstrated that g-C3N4-TiO2/GCE was a sensitive and selective OXP sensor. According to the results, the sensor has a linear range of 10 to 2030 μM, a sensitivity value of 0.04811μA/μM, and a detection limit of 0.010 μM. The recommended sensor's effectiveness in detecting OXP in prepared real samples from blood serum and urine samples of volunteers demonstrated significant recovery values (yielding recovery values exceeding 94.00%) and satisfactory precision (with a relative standard deviation of less than 4.23%), demonstrating that the g-C3N4-TiO2/GCE sensor was dependable and accurate for measuring OXP levels in serum and urine samples.