Novel boron-doped carbon dots (BCDs) with extended afterglow characteristics were synthesized via a one-step solvothermal method using acrylamide, sulfosalicylic acid, and sodium tetraborate as protective matrices. The presence of boron from sodium tetraborate introduced an empty orbital, allowing it to form a more extended conjugated system with adjacent oxygen atoms, thereby lowering the energy level of the lowest unoccupied molecular orbital in the system. The phosphorescence emission of these BCDs exhibits a red shift over time from 450 to 500 nm. These BCDs have been effectively utilized to produce anti-counterfeit phosphorescent powder. Additionally, the BCDs display optimal fluorescence excitation at 330 nm and optimal emission at 420 nm. They demonstrate a detection limit for ciprofloxacin hydrochloride of 37 nM in the 1-100 µM concentration range and 26 nM in the 100-210 µM range. This fluorescence detection is governed by an inner filter effect. Real sample testing further confirms that these BCDs serve as excellent sensors for ciprofloxacin hydrochloride.