The 5d-4f transition energies of lanthanides are very versatile, especially the 4f65d1-4f75d0 transition energy of Eu2+ has high luminescence efficiency and is used in various luminescent materials such as phosphors like SrxCa1-xAlSiN3: Eu2+, scintillators, and solid-state lasers, etc. However, there are materials that do not undergo pure 5d-4f transitions, showing the so-called anomalous luminescence instead. The anomalous luminescence is caused by the formation of excitons due to the overlap of the 5d level of Eu2+ with the conduction band and the transition of electrons from the conduction band to the 4f level, resulting in a shift to a lower energy than the general 5d-4f transition energy. A more detailed analysis of this phenomenon is important for the development of novel luminescent materials using Eu2+.In this study, we aimed to theoretically analyze the anomalous luminescence based on first-principles electronic structure calculations. The model clusters of Eu2+-doped crystals consisting of Eu2+ at the substitution site and the surrounding ions were created. Then molecular orbital calculations were performed by the relativistic discrete-variational Xα (DV-Xα) method and subsequently multiplet calculations were performed by the relativistic discrete-variational multi-electron (DVME) method. These first-principles calculations were carried out for Eu2+-doped crystals that show anomalous luminescence and those that do not show anomalous luminescence, and the electronic states of these materials were compared in detail.