An effective adsorbent was synthesised from nanographene oxide for the removal of the alprazolam drug from the water sample solution. The dispersive solid‐phase extraction method was used with α‐pyridylamine grafted nanographene oxide to extract and analyse little amounts of alprazolam in biological materials. Before beginning the experimental analysis process, it is critical to use a simple and accessible sample preparation approach. In the current study, a technique for preconcentration and measurement of trace quantities of alprazolam in aqueous samples was introduced. The pH of extraction, the amount and type of elution solvent and the period of extraction were all tuned in the alprazolam analysis technique. Analytical parameters such as the concentration factor, the limit of detection of the technique and relative standard deviation (%) were achieved as 20, 8.0 µg L
−1
and 2.4%, respectively.