Threshold switching (TS) materials, such as amorphous chalcogenide, have received significant attention for their application in storage class memory and in-memory computing. These materials contribute to efficient data processing and reduced power consumption in data centers. The initial switching process after fabricating a TS device, known as “forming,” has a profound impact on its subsequent TS behavior. However, it remains unclear how TS materials undergo changes in their atomic and electronic structures during the forming process. Consequently, the key factors that govern TS behavior remain obscure, necessitating a deeper understanding of the underlying physics behind TS phenomena. In this Letter, we investigated the forming state of the TS material AlTeN by combining scanning internal photoemission microscopy (SIPM) and ab initio calculations. Thanks to nondestructive evaluation by SIPM measurements, we observed local bandgap narrowing of AlTeN after its forming process. This is an experimental demonstration showing the presence of nuclei of the conductive filament formed in its ON state. Moreover, we conducted an ab initio calculation to reveal the origin of bandgap narrowing. We applied strong electrothermal stresses to the AlTeN model by ab initio molecular dynamics simulation with high electronic and lattice temperatures. By quenching from the electrothermal stress conditions, we reproduced an experimentally observed forming state with a narrowed bandgap. Analysis of the electronic structures of the forming state revealed that the origin of bandgap narrowing is the generation of the valence band top and conduction band bottom stemming from the increased homopolar bonds.