The preparation of 3 kinds of carbonaceous nanocomposites by hydrothermal treatment and subsequent calcination described. The first comprises a nanomaterial of type CuO/g-C3N4, with g-C3N4 in mass fractions of 2, 5 and 7 wt%, respectively. The second comprises CuO/porous carbon (5 wt%), and the third comprises CuO/carbon spheres (5 wt%). All of them were employed to modify a glassy carbon electrode (GCE) to obtain electrochemical sensors for glucose and dopamine. The GCE modified with CuO/g-C3N4 (5 wt%) displays the highest electrocatalytic activity towards glucose and dopamine. Figures of merit for sensing glucose (in 0.1 M NaOH solution) include a wide linear range (0.5 μM to 8.5 mM), a detection limit of 0.150 μM, and a sensitivity of 0.274 μA·μM−1·cm−2 (at a working potential of 0.60 V vs. Ag/AgCl). The respective data for dopamine (in pH 7.0 solution) are linear ranges from 0.2-16.0 μM and 16.0-78.7 μM, a lower detection limit of 60 nM, and an electrochemical sensitivity of 0.834 and 0.331 μA·μM−1·cm−2 (at a working potential of 0.22 V vs. Ag/AgCl). The good performance of the modified GCE is attributed to the synergetic interactions between CuO and the appropriate fraction of g-C3N4, and the improvement of conductivity.