A novel spiropyran derivative was synthesized for heavy metals sensing in water. Considering the environmental and human risks of contamination of heavy metals, it is necessary to develop rapid, sensitive, and simple methods to estimate their presence in water. While spiropyran derivatives have been extensively studied, many are soluble solely in organic solvents. To address this challenge, a spiropyran derivative (SPSO) was synthesized adding the methoxy functional group at the benzopyran moiety and tested for sensing several ions (cations and anions) in aqueous solution. The new derivative was structurally characterized by Fourier transformed infrared (FTIR-ATR), nuclear magnetic resonance (NMR) and single crystal by X-ray diffraction. The SPSO binding affinity to several ions was investigated by spectroscopy measurements (UV–visible absorption analysis and naked eye aqueous solution color change). The results demonstrated a specific colorimetric change of color of the solution when in presence of mercury (II) ion due to the SPSO greater binding affinity. Even though Al3+ and Cu2+ caused a minor decrease in the visible band associated with the MC isomer, only Hg2+ was capable of inducing a shift in the color of the solutions from pink to yellow, even at lower concentrations. The experimental results suggest that SPSO could serve as a rapid, sensitive, and simple tool for detecting Hg2+ ions in water with high selectivity with a LOD of 0.1 mmol.L–1, while maintaining its performance in the presence of potential interferences. Further experiments may still be conducted to evaluate this behavior in samples obtained from contaminated natural sources.