The adsorption of 2-aminopyridine (2-AP) and 3-aminopyridine (3-AP) on the external surface of B12N12and Al12N12fullerene-like nanocages (FLNs) is probed herein via DFT/M06-2X/6-311G(d,p) level of theory. It came out from the study that all FLN@X-AP states investigated are spontaneously formed. Moreover, topological analysis demonstrated that the boron nitride FLN can strongly adsorbed the APs through B-N covalent interactions. Energy values of -345.22 and − 328.55 kJ/mol respectively after the adsorption of 2-AP and 3-AP were further found for the above mentioned bonds. A significant change in the HOMO-LUMO band gap of B12N12, with values of 22.01 and 32.71% have been obtained following the adsorption of 2-AP and 3-AP respectively. Accordingly, the conductivity of B12N12is greatly enhanced by the adsorption of the APs. The above observations, combined with those found from the analysis of dipole moments and molecular electrostatic potential maps predict B12N12to be more sensitive to the aminopyridines investigated than the Al12N12FLN from the theoretical point of view.