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 Tm3+-doped YAlO3 (YAP), of monoclinic Pm symmetry, with an 80-atom per unit cell. An unbiased CALYPSO structure search indicates that the Tm3+ impurity ion tends to substitute the position of Y3+ in the YAP crystal lattice. Electronic band structure calculations reveal that the insulated behaviors of YAP are significantly eliminated after doping the impure Tm3+ 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 4f12 electronic structures and energies of Tm3+ ions in the YAP crystal are calculated. The theoretical results indicate that the electric-dipole-induced transition 3H4 ��� 3H5 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.