Within the framework of the density functional theory and methods of molecular dynamics, the process of destruction of a silicon p-n junction at the influence of an electromagnetic pulse (thermal effect) is considered. With an increase in the amplitude of the electromagnetic pulse, a nonlinearity of the mobility of quasiparticles arises and impact ionization processes occur, leading to the formation of various defects in the crystal lattice of the semiconductor. The evolution of the occurrence of point defects in a semiconductor by thermal deformation, as well as a further increase in their concentration, is shown. It is demonstrated that the primary passage of an electromagnetic pulse generates defects in a defect-free crystal. Further thermal impact of the pulse leads to an increase in the deviation of atoms, leading to the accumulation of defects and the destruction of the structure. With an increase in temperature, the p-n junction loses its rectifying properties and an instantaneous increase in the magnitude of the reverse current is observed due to the occurrence of an ionization current, which coincides in direction with the saturation current. It is revealed that thermal deformation significantly distorts the p-n junction profile. It was found that the destruction of the semiconductor structure occurs in the defect-free part of the crystal, and the defects stimulate destruction. In semiconductors doped with Li or Sr, the destruction time of the p-n junction increases due to the occupation of mobile Li or Sr ions by the formed silicon vacancies during the thermal action of the pulse. The results obtained can be useful in the development of semiconductor structures resistant to external influences of an electromagnetic pulse.