In the present study, the potential of B12P12 nanocage in detecting and delivering prothionamide (PA) in the presence of a static electric field (SEF = 0.005 to SEF = 0.075 a.u.) and Be2+, Mg2+, and Ca2+ ions, encapsulated inside the B12P12 nanocage, was investigated at cam- B3LYP/6-31G(d,p) level of theory using the Gaussian 09 package program. The electrical, quantum, and thermodynamic properties, the quantum theory of atoms in molecules (QTAIM), UV-Vis, IR spectra, and reduced density gradient (RDG) of all systems were calculated. The results of AIM, RDG, localized-orbital locator (LOL), and electron localization function (ELF) analyses showed that there was a sigma and electrostatic bond between PA and nanocage. The Be2+ ion had the greatest effect on the electrical behavior of nanocage and increased the conductivity, activity, and electron affinity of nanocage, which together play an important role in the interaction of nanocage with drugs. The Eads, ΔG, and ΔH values of PA adsorption on the surface of the Be2+@B12P12 nanocage were more than those in other models. The calculation results showed that the SEF did not play a significant role in the conductivity properties of nanocage and the development of a suitable drug sensor.