A highly selective fluorescent probe Por-RBO for Hg2+ was designed and synthesized with Rhodamine B and porphyrin as the fluorophore. The sensor can determine the Hg2+ of a solution within the pH 5.0 to 8.0, free from interference of other metal ions. When detected in buffer solution, the fluorescence was the strongest when 5 times the concentration of Hg2+ ion was added. Calculated by fluorescence titration method, the detection limit of probe Por-RBO for Hg2+ ion was as low as 0.12µmol/L. The geometries of Por-RBO and Por-RBO- Hg2+ were optimized at the B3LYP/6-31G** level by density functional theory. The charge distribution, orbital interactions and bonding characteristics were analyzed and compared in detail to discuss the recognition mechanism and structure-fluorescence property relationships. The results of cell fluorescence imaging and CCK-8 experiments showed that the probe Por-RBO has low cytotoxicity and can be used for fluorescence distribution imaging of Hg2+in living cells.