Abstract In many exoplanetary systems with ‘hot Jupiters’, it is observed that the spin axes of host stars are highly misaligned to planetary orbital axes. In this study, a possible channel is investigated for producing such a misalignment under a hierarchical three-body system where the evolution of stellar spin is subjected to the gravitational torque induced from the planet inside Kozai–Lidov (KL) resonance. In particular, two special configurations are explored in detail. The first one corresponds to the configuration with planets at KL fixed points, and the second one corresponds to the configurations with planets moving on KL librating cycles. When the planet is located at the KL fixed point, the corresponding Hamiltonian model is of one degree of freedom and there are three branches of libration centres for stellar spin. When the planet is moving on KL cycles, the technique of Poincaré section is taken to reveal global structures of stellar spin in phase space. To understand the complex structures, perturbative treatments are adopted to study rotational dynamics. It shows that analytical structures in phase portraits under the resonant model can agree well with numerical structures arising in Poincaré sections, showing that the complicated dynamics of stellar spin are governed by the primary resonance under the unperturbed Hamiltonian model in combination with the 2:1 (high-order and/or secondary) spin-orbit resonances.