A new spiropyran derivative acts as colorimetric and fluorescent sensor for metal ions. Addition of Cu2+, Al3+, Cr3+ and Ce3+ to the sensor solution brings about marked increase in the absorption intensities while addition of other metal ions (Na+, K+, Li+, Sr2+, Hg2+, Zn2+, Co2+, Ni2+ and Ag+) fails to cause substantial change in the UV-Vis spectra. The sensor can be used for detection of Hg2+, Cu2+, Ce3+, Cr3+ and Al3+ ions by the naked eye and by fluorescence enhancement. The detection limit of Cu2+ and Hg2+ ions by the sensor is estimated to be 10 and 14 mu M, respectively. Job's plot analysis on the sensor-Cu2+ complexation reveals the formation of a 2:1 stoichiometric complex between the sensor and Cu2+ ion.