Berberine (BBR), as a natural isoquinoline alkaloid, has been demonstrated various pharmacological activities, and widely applied in the treatment of diseases. The quantitative analysis of BBR is important for its pharmacological researches and clinical applications. In the work, utilizing the specific interaction between BBR and triplex DNA, a sensitive and selective fluorescent detecting method was established with DNA-templated silver nanoclusters (DNA-AgNCs). After binding with the triplex structure in the template of DNA-AgNCs, BBR quenched the fluorescence of DNA-AgNCs and formed BBR-triplex complex with yellow-green fluorescence. The ratiometric fluorescence signal showed a linear relationship with BBR concentration in a range between 10 nM to 1000 nM, with a detect limit of 10 nM. Our method exhibited excellent sensitivity and selectivity, and it was further applied in BBR detection in real samples.