Ionic liquid-functionalized ordered mesoporous silica SBA-15 modified carbon paste electrode (CISPE) was fabricated and its electrochemical performance was investigated by cyclic voltammetry, electrochemical impedance spectra. The electrochemical behavior of Cd2+ Pb2+, Cu2+ and Hg2+ at CISPE was studied by differential pulse anodic stripping voltammetry (DPASV). Compared with carbon paste electrode, the stripping peak currents had a significant increase at CISPE. Under the optimized conditions, the detection limits were 8.0 x 10(-8) M (Cd2+), 4.0 x 10(-8) M (Pb2+), 6.0 x 10(-8) M (Cu2+), 1.0 x 10(-8) M (Hg2+), respectively. Furthermore, the present method was applied to the determination of Cd2+, Pb2 +, Cu2+ and Hg2+ in water samples and people hair sample.