We present a method for obtaining the quasi-exact solutions of the Rabi Hamiltonian in the framework of the asymptotic iteration method (AIM). The energy eigenvalues, the eigenfunctions and the associated Bender Dunne orthogonal polynomials are deduced. We show (i) that orthogonal polynomials are generated from the upper limit (i.e., truncation limit) of polynomial solutions deduced from AIM, and (ii) prove to have nonpositive norm.