This paper introduces and studies the Heun-Racah and Heun-Bannai-Ito algebras abstractly and establishes the relation between these new algebraic structures and generalized Heun-type operators derived from the notion of algebraic Heun operators in the case of the Racah and Bannai-Ito algebras.