Smart implementation of novel advanced nanocarriers such as functionalized C
24
and B
12
N
12
nanocages is used supplement for antiviral activity 5-Fluoro-2-hydroxypyrazine-3-carboxamide (Favipiravir; Avigan; T-705), as treatment of COVID-19. The interaction energies of Favipiravir with perfect (B
12
N
12
and C
24
) and doped (BC
23
and CB
11
N
12
) nanocages were studied at temperatures equal to 310.15 K and 298.15 K using DFT. Our results have shown that the interaction of the Favipiravir (C
O group) with BC
23
and CB
11
N
12
is more favorable than with the C
24
and B
12
N
12
nanocages in the gas and aqueous environments.
Additionally, the natural bond orbital, the highest occupied molecular orbital (HOMO), the lowest unoccupied molecular orbital (LUMO), energy gap, chemical reactivity, molecular electrostatic potential, and thermodynamic parameters of the optimized structure have been examined. Furthermore, the UV–Vis and infrared spectroscopy have been evaluated for the investigation of the molecular orbitals Participated in the absorption spectrum of the Favipiravir before and after the interaction with the C
24
, BC
23
, B
12
N
12,
and CB
11
N
12
, sites at maximum wavelength utilizing the time-dependent density functional theory (TD-B3LYP and TD-CAM-B3LYP). The intermolecular interactions have been analyzed by non-covalent interactions (NCI) and also, the electron localization function (ELF) is discussed.