Electronic and nonlinear optical properties of endohedral metallofullerenes are presented. The endohedral metallofullerenes contain transition metal encapsulated in inorganic fullerenes X12Y12 (X = B, Al & Y = N, P). The endohedral metallofullerenes (endo-TM@X12Y12) possess quite interesting geometric and electronic properties, which are the function of the nature of the atom and the size of fullerene. NBO charge and frontier molecular orbital analyses reveal that the transition metal encapsulated Al12N12 fullerenes (endo-TM@Al12N12) are true metalides when the transition metals are Ni, Cu and Zn. Endo-Cr@Al12N12 and endo-Co@Al12N12 are at the borderline between metalides and electrides with predominantly electride characteristics. The other members of the series are excess electron systems, which offer interesting electronic and nonlinear optical properties. The diversity of nature possessed by endo-TM@Al12N12 is not prevalent for other fullerenes. Endo-TM@Al12P12 are true metalides when the transition metals are (Cr-Zn). HOMO-LUMO gaps (EH-L) are reduced significantly for these endohedral metallofullerenes, with a maximum percent decrease in EH-L of up to 70%. Many complexes show odd–even oscillating behavior for EH-L and dipole moments. Odd electron species contain large dipole moments and small EH-L, whereas even electron systems have the opposite behavior. Despite the decrease in EH-L, these systems show high kinetic and thermodynamic stabilities. The encapsulation of transition metals is a highly exergonic process. These endo-TM@X12Y12 possess remarkable nonlinear optical response in which the first hyperpolarizability reaches up to 2.79 × 105 au for endo-V@Al12N12. This study helps in the comparative analysis of the potential nonlinear optical responses of electrides, metalides and other excess electron systems. In general, the potential nonlinear optical response of electrides is higher than metalides but lower than those of simple excess electron compounds. The higher non-linear optical response and interesting electronic characteristics of endo-TM@Al12N12 complexes may be promising contenders for potential NLO applications.