A simple and rapid approach that can effectively convert bamboo tar into carbon quantum dots (CQDs) was developed and this kind of CQD was adopted for the selective detection of 2,4,6-trinitrophenol (TNP).