The molecular field theory of exchange interaction has been applied to investigate the spin-reorientation transition in intermetallic compound HoMn6Sn6. The theoretically calculated temperature dependence of easy magnetization direction is in good agreement with experimental data. The temperature dependence of magnetocrystalline anistropic constants of Ho ion K1R and K2R have been calcullated in the framework of single ion model. It is shown that the fourth-order crystal field parameter B04 and the corresponding second-order magnetocrystalline anistropic constant K2R of Ho ion have to be taken into account in order to explain the spin-reorientation transition. The competition between K2R and K1R plays an important role in the spin-reorientation transition in HoMn6Sn6.