In recent years, concerns about the presence of pharmaceutical compounds in wastewater have increased. Various types of residues of tetracycline family antibiotic compounds, which are widely used, are found in environmental waters in relatively low and persistent concentrations, adversely affecting human health and the environment. In this study, a resorcinol formaldehyde (RF) aerogel was prepared using the sol–gel method at resorcinol/catalyst ratio of 400 and resorcinol/water ratio of 2 and drying at ambient pressure for removing antibiotics like minocycline. Next, RF aerogel was modified with graphene and to increase the specific surface area and porosity of the modified sample and to form the graphene plates without compromising the interconnected porous three-dimensional structure of the aerogel. Also, the pores were designed according to the size of the minocycline particles on the meso- and macro-scale, which bestowed the modified sample the ability to remove a significant amount of the minocycline antibiotic from the aqueous solution. The removal percentage of the antibiotic obtained by UV–vis spectroscopy. Ultimately, the performance of prepared aerogels was investigated under various conditions, including adsorbent doses (4–10 mg), solution pHs (2–12), contact times of the adsorbent with the adsorbate (3–24 h), and initial concentration of antibiotic (40–100 mg/l). The results from the BET test demonstrated that the surface area of the resorcinol formaldehyde aerogel sample, which included 1 wt% graphene (RF-G1), exhibited an augmentation in comparison to the surface area of the pure aerogel. Additionally, it was noted that the removal percentage of minocycline antibiotic for both the unmodified and altered samples was 71.6% and 92.1% at the optimal pH values of 4 and 6, respectively. The adsorption capacity of pure and modified aerogel for the minocycline antibiotic was 358 and 460.5 mg/g, respectively. The adsorption data for the modified aerogel was studied by the pseudo-second-order model and the results obtained from the samples for antibiotic adsorption with this model revealed a favorable fit, which indicated that the chemical adsorption in the rapid adsorption of the antibiotic by the modified aerogel had occurred.