Rare earth ions in the oxide semiconductors are commonly surrounded by oxygen (O) ligands which are the first nearest neighbors to rare earths. Intensities of the rare earth‐related luminescence are strongly influenced by crystal symmetry of the rare earth ions. Especially, distortion of the first nearest neighbor bonds is key to improving emission from these luminescent centers. In this paper, samarium (Sm) is doped into titanium dioxide (TiO2) with two different crystal structures, anatase and rutile, to investigate the influence of the different host crystal symmetries on the material optical properties. Sm‐related photoluminescence (PL) intensity from the samples, annealed at different temperatures reveals the optimal preparation condition. Also, X‐ray absorption fine structure (XAFS) spectra are measured, providing detailed information regarding the local fine structure around Sm. From these studies, the authors find that the optical properties of the TiO2:Sm are not only influenced by structural changes in the first nearest neighbor, O, but also the second nearest neighbor, Ti by annealing at different temperatures and/or crystal structure of TiO2. The authors discuss the connection between the enhanced PL intensity and the local fine structure around the Sm luminescent centers, including these changes in the second nearest neighbor, Ti.