A novel fluorescent Mg2+ probe was developed based on a small molecule-protein hybrid. This probe enables subcellular targeting, long-term imaging, and high selectivity for Mg2+ over Ca2+. Using ratiometric fluorescence microscopy with a co-localized standard fluorophore, the variations in intranuclear Mg2+ concentrations during mitosis could be visualized.