The recent renaissance of the use of rare-earth-doped yttrium orthoaluminate as an ideal laser material has generated significant interest; however, the unique structural features underlying many of its outstanding optical properties still require elucidation. To solve this intriguing problem, we performed a systematic first-principles study; the results of the study reveal a new stable phase for Tm-doped YAlO (YAP), of monoclinic Pm symmetry, with an 80-atom per unit cell. An unbiased CALYPSO structure search indicates that the Tm impurity ion tends to substitute the position of Y in the YAP crystal lattice. Electronic band structure calculations reveal that the insulated behaviors of YAP are significantly eliminated after doping the impure Tm ions, as evidenced by the minor energy gap of about 0.4 eV, which is close to the band gap energy of a 2 μm emitter source. On the basis of our developed crystal-field theory method, the 4f electronic structures and energies of Tm ions in the YAP crystal are calculated. The theoretical results indicate that the electric-dipole-induced transition H → H is mainly responsible for producing the light wave at approximately 2.3 μm. The present results provide an essential understanding of the rare-earth-ion-doped lasing materials and serve as a practical tool for further exploration of such materials.