A facile and straightforward microwave-assisted method was used to prepare polyamine-functionalized carbon dots (CDs) from a precursor comprising renewable xylan and branched polyethyleneimine (BPEI). The as-prepared BPEI-CDs were monodispersed sphere particles with an average diameter of about 8.62 nm, and exhibited excellent fluorescent property and high stability, as well as excitation-independent emission behavior. Furthermore, it is attractive that the BPEI-CDs can be used as novel fluorescent probes for detecting tannic acid (TA) sensitively and selectively. At the optimum condition, the TA detection system was established in water solution and ethanol solution with a dynamic range from 0.1 to 5 μM, and their detection limit of 36.8 nM and 44.9 nM were also determined, respectively. Most importantly, the BPEI-CDs-based sensors can be successfully applied to detect TA in real lake water and white wine samples, suggesting the low-cost and excellent BPEI-CDs are potential suitable for TA detection in practical application.