The importance of buffer solution for voltammetric detection of heavy metal ions has been repeatedly introduced, however the influence mechanism has not been further studied. Herein, the effect of different buffer solutions on the determination of Cu(II) by graphite carbon nitride modified electrode (W–g-C3N4/ITO) was studied for the first time by X-ray photoelectron spectroscopy. The chemisorption between the buffer solution and W–g-C3N4 and the complexation of different buffer molecules on Cu(II) together affect the detection of copper ions by W–g-C3N4/ITO.