In the current research, a green strategy to synthesis carbon quantum dots (CQDs) with a quantum yield (QY) of nearly 19% has been successfully established. Subsequently, the different features of as-prepared CQDs was evaluated by detailed analyses including high resolution transmission electron microscopy (HRTEM), Fourier transform infrared spectroscopy (FTIR), X-ray photoelectron spectroscopy (XPS), and photoluminescence (PL) spectra. The different analyses proved that the CQDs obtained here had various advantages such as quasi-spherical shape, different functional groups, and great optical features. Additionally, the as-synthesized CQDs were employed for optical detection of Ibuprofen based on the interactions between Ibuprofen and diverse functional groups such as -OH, C-H, and N-H that existed on the surface of CQDs, resulting in aggregations that facilitate to quench the fluorescence (FL) of CQDs. Furthermore, the results indicated that the as-prepared CQDs can detect Ibuprofen in a linear range of 0 to 100 µM with a limit of detection (LOD) of 1.18 µM (signal to noise ratio of 3).