We propose a ratio-dependent Leslie–Gower predator–prey model with the Allee effect and fear effect on prey and study its dynamic behaviors. On the basis of Poincaré transformation and blow-up method, we find that the solutions of the system are bounded and the origin is attractive. We consider the existence of equilibria and analyze their stability. The bifurcation of the system was analyzed, including the occurrence of saddle–node bifurcation, degenerate Hopf bifurcation, and Bogdanov–Takens bifurcation. The results show that the system has a cusp of codimension two and undergoes a Bogdanov–Takens bifurcation of codimension two. Numerical simulation results show that there exist two limit cycles (the inner one is stable and the outer one is unstable) and a Bogdanov–Takens bifurcation of codimension two in the system.