This work explores Cu-modified B 12 N 12 and Al 12 N 12 nanocages for cadaverine diamine (Cad) detection using advanced density functional theory (DFT) calculations. The study found that Cu modification altered the geometry of the nanocages, increased the dipole moment, reduced the energy gap, and enhanced the reactivity. While pristine B 12 N 12 and Al 12 N 12 were not sensitive to Cad, the modified Cu(b 64 )B 12 N 12 and Cu(b 66 )Al 12 N 12 nanocages showed significantly higher electronic sensitivity (Δgap = 39.8% and 35.6%, respectively), surpassing the literature data. However, molecular dynamics (MD) revealed that the Cu(b 66 )Al 12 N 12 nanocage is not stable in the long term, since the nanocage changes configuration to Cu(b 64 )Al 12 N 12 , which is less sensitive and has an even longer recovery time for Cad sensing. Adsorption energy analysis (E ads ) showed a strong interaction of Cad/nanocages, while charge analysis suggested that the nanocages act as Lewis acids, accepting electrons from Cad. UV−vis spectra confirmed that Cu(b 64 )B 12 N 12 responds optically to the presence of Cad. Furthermore, Cu(b 64 )B 12 N 12 showed greater sensitivity to Cad compared to NO, H 2 , H 2 S, CO, COCl 2 , N 2 O, N 2 gases, or H 2 O, showing high selectivity to diamine against interfering gases or water, standing out as a promising material for environmental applications in electronic, optical or work function sensors for cadaverine detection, even in humid environments.