The use of wavelength selection before partial least squares regression (PLSR) for simultaneous determination of divalent metal ions, cadmium, zinc and cobalt by UV–Vis spectrometry was investigated in this paper. The number of wavelengths selected by competitive adaptive reweighted sampling (CARS) for cadmium, zinc, and cobalt were 21, 13 and 7, respectively, from the 916 original wavelength points. The analytical system was based on the formation of the complexes with 2-(5-bromo-2-pyridylazo)-5-(diethylamino)phenol (Br-PADAP) in surfactant media. Compared with the results of full spectra calibration, the root mean squared error of prediction (RMSEP) reduced to 0.0110, 0.0098 and 0.0031 for cadmium, zinc and cobalt, respectively. Moreover, by using the selective wavelengths instead of the 916 original wavelengths, the latent variables of PLS models reduced to 3, 3 and 4. The results indicated that the PLS model established by selected wavelength could be used for simultaneous determination of divalent metal ions.