Development of a high performance fluorescent sensor from natural berberine for selective detection of metal ions and anions is a great challenge. Herein, a novel turn-on fluorescent probe TB for the detection of both Hg2+ and ClO- has been successfully designed and synthesized from berberine. The probe TB showed good selectivity and sensitivity to Hg2+ and ClO- in CH3OH/PBS (7:3, v/v, pH = 7.4, 10 mM) solution, and it emitted yellow fluorescence upon the addition of Hg2+ and cyan fluorescence upon the addition of ClO-. Moreover, the limits of detection (LOD) for Hg2+ and ClO- were calculated to be 0.409 mu M and 0.295 mu M based on 3 sigma/k method, respectively. In addition, the mechanisms of TB for sensing Hg2+ and ClO- were established based on HRMS, Job's plot and H-1 NMR titrations. Furthermore, the probe TB displayed many important practical applications, such as water sample analysis, imaging in plant cell and zebrafish bioimaging.