We theoretically study the Goos-Hänchen (GH) and Imbert–Fedorov (IF) shifts of a reflected Gaussian beam from a hyperbolic metasurface composed of graphene grating based on topological insulators (TIs). Perturbations are generated on the surface of TIs by applying a thin magnetic film, resulting in a broken time-reversal symmetry. The GH and IF shifts are greatly enhanced as a result of the combined interaction of the graphene grating and the topological magnetoelectric effect (TME). In particular, even with the p-polarized incident beam near Brewster angles, the magnitude of IF shifts is increased by approximately two orders when compared to the case without graphene or a single layer of graphene. A critical frequency is identified when the propagation model in TIs transitions from a surface wave to a bulk wave, which leads to comparatively substantial GH shifts with high reflection. By adjusting the filling ratio, chemical potential and rotation angle of the graphene grating, the shift of GH and IF can be controlled. The dependence of the spatial shifts on the TME and the degree of anisotropy of the TI are also discussed. Our results may provide new possibilities for applications of the TI with the TME.