Nanomaterials represent a promising frontier in drug delivery systems for combating cancer, offering precise targeting of tumour cells. This study delves into the encapsulation capabilities of 5-fluorouracil (5-FU) on pristine armchair (6,6) single-wall boron-, aluminium-, and gallium-nitride nanotubes (BNNT, AlNNT, GaNNT), both in their natural state and doped with silver (Ag) atoms under gas phase and water solution conditions. Employing density functional theory calculations at the M06-2X level, we scrutinise the geometric stabilities, encapsulation efficiencies, and electronic interactions between 5-FU molecules and NNTs. Our results reveal that a shorter distance between the drug and nanotube cavity enhances encapsulation ability and solubility while facilitating larger charge transfers, especially within Ag-doped NNTs. The Ag doping significantly augments the reactivity of NNTs towards 5-FU molecules, with thermodynamic analyses indicating exothermic and spontaneous interactions with Ag-doped NNTs. The decapsulation of 5-FU from Ag-BNNT, Ag-AlNNT, and Ag-GaNNT necessitates recovery time 6.42E+00, 3.21E+05, and 2.19E−04 s, with corresponding adsorption energies of −38.70, −49.52, and −28.42 kcal/mol, respectively. Electronic analyses demonstrate notable changes in states’ energy gap and density post-5-FU encapsulation in Ag-doped NNTs, suggesting enhanced sensitivity. Moreover, our investigation delves into topological features, molecular stability, bond strength, and intermolecular interactions using various analytical techniques, including MEPs, ELF maps, NBO, QTAIM, Hirshfeld surface, and RDG analyses. These comprehensive findings underscore the potential of Ag-doped NNTs as promising components for drug delivery systems and biosensors in nanomedicine applications, particularly in sensing and catalytic functions for 5-FU molecule encapsulation and detection.