A highly selective fluorescent sensor Por‐RBO for determination of Hg2+ was designed and synthesized with Rhodamine B and Tetraphenylporphyrin. The sensor can determine the Hg2+ of a solution within the pH 5.0–8.0, free from interference of other metal ions. When detected in buffer solution, the fluorescence was the strongest when five times the concentration of Hg2+ ion was added. Calculated by fluorescence titration method, the detection limit of sensor 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 indicate that the sensor Por‐RBO exhibits lower cytotoxicity. Por‐RBO can be used for fluorescence distribution imaging of Hg2+ in living cells.