The interactions between the metronidazole molecule and three different carbon-based nanostructures, fullerene (C60), carbon nanotube (CNT), and carbon nanosheet (CNS), were examined using density functional theory (DFT) calculations. The results indicate that C60 attaches metronidazole more stronger than CNT and CNS, and the adsorption energies of metronidazole with C60, CNT, and CNS are decreased after considering the solvent effects. The variation in energy gaps follows the order of CNS > C60 > CNT, indicating that CNS has better sensing performance for metronidazole compared to fullerene and CNT. Both CNT and CNS show a reasonable recovery time at an achievable operating temperature. According to the quantum theory of atoms in molecules (QTAIM) and symmetry-adapted perturbation theory (SAPT), the dispersion component is the primary factor in stabilization, followed by electrostatic interaction. Simulated infrared (IR) and ultraviolet-visible (UV–Vis) spectra provide a basis reference for further structural characterization. This work indicates that carbon-based nanomaterials have potential applications in the delivery and detection of metronidazole.