First-principles calculations are performed to study the absorption spectra and electron-vibration coupling of titanium-doped sapphire (Ti:Al2O3). Geometry optimization shows a local structure relaxation after the doping of Ti. Electronic band structure calculation shows that five additional dopant energy bands are observed around the band gap of Al2O3, and are attributed to the five localized d orbitals of the Ti dopant. The optical absorption spectra are then predicted by averaging the oscillator strength during a 4 ps first-principles molecular dynamics (MD) trajectory, and the spectra agree well with the experimental results. Electron-vibration coupling is further investigated by studying the response of the ground and excited states to the Eg vibrational mode, for which a configuration coordinate diagram is obtained. Stokes shift effect is observed, which confirms the red shift of emission spectra of Ti:sapphire. This work offers a quantitative understanding of the optical properties and crystal-field theory of Ti-doped sapphire. The first-principles calculation framework developed here can also be followed to predict the optical properties and study the electron-vibration coupling in other doped materials.