By preparing biocompatible carbon dots (CDs) that act as the scaffold and fluorescence reference, a ratiometric fluorescent nanoprobe based on Tb3+ ions functionalized CDs was designed and fabricated to detect an anthrax biomarker with high selectivity and sensitivity.