In the current work, the interaction of 4-Mercaptopyridine drug (4-MCP) with the pristine, Cu, and Zn doped boron phosphide nanocage (B 12 P 12 ) in the absence and presence of static electrical field (SEF) were investigated by density functional theory (DFT) and TD-DFT methods at the cam-B3LYP/Lanl2DZ level of theory by Gaussian 09 software. The calculated results demonstrated that the adsorption of the 4-MCP from the N site on the B site of nanocage in the 4-MCP&B 12 P 12 complex was more desirable than 4-MCP&CuB 11 P 12 , and 4-MCP&ZnB 11 P 12 complexes. In the presence of static electrical field (SEFz + 0.02, SEFz + 0.03, and SEFz + 0.04 au), the adsorption energy of 4-MCP&B12P12 complex in all adsorption models increases from the original state. On the other hand, the gap energy of 4-MCP&B 12 P 12 , 4-MCP&CuB 11 P 12 , and 4-MCP&ZnB 11 P 12 complexes in presence of the SEF field decreases significantly from the pure state, thereby the conductivity and reactivity of nanocage increase significantly from the pure state. This result demonstrates that in the presence of a SEF field, the sensitivity of B 12 P 12 to detect 4-MCP in the system increases, and this method is suitable for making a sensitive sensor for 4-MCP. The RDG (reduced density gradient), NBO (natural bond orbital), and AIM (atom in molecule) results confirm that the bond nature between 4-MCP and B 12 P 12 nanocage in all studied complexes is a partially covalent bond type. The results of this study suggest that the application of an external electric field is important in the targeted adsorption and transport of drugs, as well as in determining the location of drugs in the body and boosting the therapeutic effect of the drug.