The electronic structures and the absorption spectra of the indium and manganese codoped LiNbO3 crystals and their comparative groups are investigated by first-principles based on the density functional theory. The supercell crystal structures are established with 60 atoms, including four models:the near-stoichiometric pure LiNbO3 crystal (LN), the manganese doped LiNbO3 crystal (Mn:LN, charge compensation model as MnLi+-VLi+), the indium and manganese codoped LiNbO3 crystal (In:Mn:LN, charge compensation model as InLi2+-MnLi+-3VLi+), and the other indium and manganese codoped LiNbO3 crystal (In(E):Mn:LN, charge compensation model as InLi2+-InNb2--MnLi+-VLi+). The results show that the extrinsic defect levels within the forbidden band of Mn:LN crystal are mainly contributed by Mn 3d orbital electrons, which also affect the top of the valence band. The band gap of Mn:LN about 3.18 eV is narrower than that of LN; the band gaps of In:Mn:LN and In(E):Mn:LN sample are 2.82 and 2.93 eV respectively. The electron density of state (DOS) of manganese codoped LiNbO3 crystal shows that the orbits of Mn 3d, Nb 4d and O 2p superpose each other, i.e., forming covalent bonds, which result in conduction and valence bands shifting toward low energy. The indium ion does not contribute the extrinsic energy level within forbidden band, it affects the band gap through changing O2- electron cloud shape. The band gap narrows down if the indium ions occupy lithium ion positions, and becomes broad if the indium ions occupy niobium ion positions. It is found that the Mn:LN, In:Mn:LN and In(E):Mn:LN samples display the absorption peaks at 3.25, 3.11, 2.97, 2.85, 2.13 and 1.66 eV. The last absorption peak is contributed by the electron transferring from the Mn2+ energy level to conduction band, and the doping of indium ions leads to attenuation of this peak. The peak at 2.13 eV relates to the Mn3+, it is enhanced by the doped indium ions. The indium ions in crystal would influence the absorption, which relates to manganese ions, by transforming manganese ion valence via the formula as m Mn2++In3+→Mn3++In2+, that is, with the doping of the indium ions, the photorefractive center Mn2+ concentration decreases, which is responsible for the absorption peak at 1.66 eV. It must be mentioned that the Mn2+ possesses not only the shallow levels as mentioned previously, but also the deep ones which are responsible for the absorptions at 2.85 eV and other high energies. For the indium and manganese codoped LiNbO3 crystals, if the recording light is chosen at near 1.66 eV (748 nm), the relatively low concentration of indium ions is proposed to be chosen to achieve the high recording sensitivity.