A simple and rapid analytical method of determining Pb2+ and Cd2+ in water samples using an electrochemically pretreated pencil-graphite electrode (EP-PGE) is proposed for the first time in the literature. An electrochemically pretreated pencil-graphite electrode was prepared by performing potential cycling between -0.3 V and 2.0 V in 0.1 mol L-1 H3PO4 solution to improve its ability to electrochemically sense Pb2+ and Cd2+ ions. Square-wave anodic stripping voltammetry (SWASV) was used as the electroanalytical method. The electroanalytical parameters that influence the stripping determination of Pb2+ and Cd2+ were optimized based on experimental results. The magnitude of the peak oxidation current was adjusted in order to optimize the value of each parameter. Applying the resulting disposable electrode under the optimized conditions led to good selectivity and sensitivity in the determination of Pb2+ and Cd2+ ions. Interference from coexisting ions was also investigated. The resulting sensor was successfully tested by applying it to a standard reference water sample. Under the optimized conditions, the limits of detection were 0.46 mu g L-1 for Pb2+ and 1.11 mu g L-1 for Cd2+ using the electrode. Relative standard deviations (%RSD) were 2.76 for Pb2+ and 2.85 for Cd2+. The linear working ranges of the electrode for Pb2+ and Cd2+ ion detection were 5-45 mu g L-1 and 10-40 mu g L-1, respectively.