By using plane wave pseudopotential method based on the first principles, the optoelectronic properties of β-FeSi2 doped with Er are calculated and analyzed. The calculation results show that: after Er doped, the cell volume increases, and Er tends to replace the FeII atom. The analysis of band structure after incorporation of Er near the Fermi level becomes smoothly, and the Fermi level moves down into the valence band, the band gap narrows significantly. The static dielectric constant improves significantly, but the peak of absorption coefficient decreases significantly. These results indicate that the optoelectronic properties of β-FeSi2 change with Er doped.