The electronic structure of the intercalated iron-based superconductor Ba2Ti2Fe2As4O (Tc - 21.5 K) has been investigated by using angle-resolved photoemission spectroscopy and combined local density approximation and dynamical mean field theory calculations. The electronic states near the Fermi level are dominated by both the Fe 3d and Ti 3d orbitals, indicating that the spacing layers separating different FeAs layers are also metallic. By counting the enclosed volumes of the Fermi surface sheets, we observe a large self-doping effect, i.e. 0.25 electrons per unit cell are transferred from the FeAs layer to the Ti2As2O layer, leaving the FeAs layer in a hole-doped state. This exotic behavior is successfully reproduced by our dynamical mean field calculations, in which the self-doping effect is attributed to the electronic correlations in the Fe 3d shell. Our work provides an alternative route of effective doping without element substitution for iron-based superconductors.