For the past two years, doxycycline has been employed hugely for the treatment of COVID 19 over the globe. Excessive use of doxycycline can result in bacteria and gene resistance, which affects the future treatment of infectious diseases. Furthermore, unused doxycycline left from the hospital and pharmaceutical industries may have an adverse effect on the environment, posing a significant menace to modern society. As a result, doxycycline detection is required. Herein, we developed blue luminous nitrogen-doped carbon quantum dots (N-CQDs) using ascorbic acid and diethylenetriamine (DETA) as carbon and nitrogen sources via a microwave-assisted technique for the differential detection of doxycycline (DC) via a fluorescence quenching mechanism, even when other tetracycline derivatives interfere. The quenching mechanism has been elaborately explained by using a Stern−Volmer plot, UV−vis and fluorescence spectroscopy, and TCSPC to attribute the static quenching and inner filter effect. In addition, the limit of detection of our suggested sensor is 0.25 μM. To confirm the structural properties and the size of the N-CQDs, FT-IR, Raman spectroscopy, HRTEM, DLS, and EDX have been performed. Moreover, this approach was used to identify doxycycline in pharmaceutical waste and bacterial cells. Because of its great sensitivity and selectivity, N-CQDs are ideal for measuring DC in environmental applications.