Generally, the first‐row transition‐metal complexes are notorious in luminescence materials because of their metal‐ligand charge transfer in emission process. Herein, we rationally used magnesium instead the first‐row transition metal to coordinate with 2‐(anthracen‐9‐yl)‐1H‐imidazo[4,5‐f][1,10]phenanthroline (AIP) in the construction of luminescent complexes. Further investigation revealed AIP could work as detector for quantitative determination of Mg2+ cation. Comparing to other divalent cations, this fluorescence sensor exhibited high selectivity for the quantitative determination of Mg2+ with the low limit of detection (5 × 10–7 m). Through X‐ray single crystal diffraction, the crystal structures of [Mg(AIP2)(NO3)2·(H2O)4] (1), [Mn(AIP)(NO3)·EtOH] (2), and [Co2(AIP)2Cl4·(MeOH)2] (3) were observed in various arrangements. The theory calculations based on crystal structures indicated the MgII complex undergoes distinct charge‐transfer process from other transition‐metals based compounds, in which charge‐transfer excited‐state lifetimes were deactivated rapidly through metal‐to‐ligand charge‐transfer (MLCT) process. This study provided insight into construction of luminescence compounds by using d0 metals in main groups instead of transition metals.