In this paper, we consider the spatiotemporal dynamics behaviors of a Leslie–Gower diffusion predator–prey system with prey refuge and Beddington–DeAnglis (B‐D) functional response. By using the Poincaré inequality and topological degree theory, we first investigate the Turing instability of the reaction–diffusion system and prove the existence of nonconstant positive steady‐state solutions. Then we discuss the steady‐state bifurcation and the direction to Hopf bifurcation of the PDE model by the local bifurcation theorem and center manifold theory. Finally, some numerical simulations are presented to supplement the analytic results in one dimension which indicates that changes in prey refuge and diffusion coefficient can increase the complexity of the system.