A solid phase extraction procedure has been presented by using multiwalled carbon nanotube impregnated with tartrazine for cadmium (Cd(II)) and lead (Pb(II)) ions. The influences of pH, flow rate, eluent and sample volume were investigated. No interference effects were observed from the alkaline, alkaline earth and some transition metals. The detection limits (LOD) were 0.8 and 6.6 mu g L-1 for Cd(II) and Pb(II), respectively. The preconcentration factor was 40. The validation of the procedure was controlled by the analysis of certified references materials. The procedure was applied to the determination of cadmium and lead in natural water and food samples. (C) 2013 The Korean Society of Industrial and Engineering Chemistry. Published by Elsevier B.V. All rights reserved.