Theta-dependent gauge theories can be studied using holographic duality through string theory in certain spacetimes. By this correspondence we consider a stack of N0 dynamical D0-branes as D-instantons in the background sourced by Nc coincident non-extreme black D4-branes. According to the gauge-gravity duality, this D0-D4 brane system corresponds to Yang-Mills theory with a theta angle at finite temperature. We solve the IIA supergravity action by taking account into a sufficiently small backreaction of the Dinstantons and obtain an analytical solution for our D0-D4-brane configuration. Subsequently, the dual theory in the large Nc limit can be holographically investigated with the gravity solution. In the dual field theory, we find that the coupling constant exhibits asymptotic freedom, as is expected in QCD. The contribution of the theta-dependence to the free energy gets suppressed at high temperatures, which is basically consistent with the calculation using the Yang-Mills instanton. The topological susceptibility in the large Nc limit vanishes, and this behavior remarkably agrees with the implications from the simulation results at finite temperature. Moreover, we finally find a geometrical interpretation of the theta-dependence in this holographic system.