This research focused on the electrochemical detection of metoprolol (MTP) in food products and biological fluids using modified electrodes made of graphitic carbon nitride (g-C3N4) and copper phthalocyanine (CuPc) nanostructures for monitoring athlete doping. The g-C3N4/CuPc nanocomposite was successfully prepared, as shown by the findings of SEM, EDX, XRD, and FT-IR studies, and CuPc anchoring rod-like structures are anchored on the g-C3N4 nanosheets. GCE, CuPc/GCE, and g-C3N4/GCE all displayed lower oxidation peaks towards addition MTP, according to electrochemical tests utilizing CV and DPV. The detection limit, sensitivity, and linear range of the sensor were determined to be 10 nM, 0.06783 mu A/mu M, and 8 to 1760 mu M, respectively. The sensor also displayed notable reactivity and selectivity towards MTP. We looked into the capacity of g-C3N4/CuPc/GCE to quantify the amount of MTP in prepared samples made from human serum and apple juice. The outcomes of the analytical evaluations, which used the common addition approach and the DPV as their target, showed how well g-C3N4/CuPc/GCE worked to identify the presence of MTP in biological fluids and food samples. The assays demonstrated strong accuracy, with a relative standard deviation (RSD) of less than 4.63%, and good recoveries ranging from 98.40 to 99.60%.