In this investigation, we offer and examine a predator–prey interacting model with prey refuge in proportion to both the species and Beddington–DeAngelis functional response. We first prove the well-posedness of the temporal and spatiotemporal models which are restricted in a positive invariant region. Then for the temporal model, we analyse its temporal dynamics including uniform boundedness, permanence, stability of all feasible non-negative equilibria and show that refugia can induce periodic oscillation via Hopf bifurcation around the unique positive equilibrium; for the spatiotemporal model, we not only investigate its permanence, stability of non-negative constant steady states and Turing instability but also study the existence and non-existence of non-constant positive steady states by Leray–Schauder degree theory. The key observation is that the coefficient of refuge cooperates a significant part in modifying the dynamics of the current system and mediates the population permanence, stability of coexisting equilibrium and even the Turing instability parameter space. Finally, general numerical simulation consequences are given to illustrate the validity of the theoretical results. Through numerical simulations, one observes that the model dynamics shows prey refugia and self-diffusion control spatiotemporal pattern growth to spots, stripe–spot mixtures and stripes reproduction. The outcomes assign that the dynamics of the model with prey refuge is not simple, but rich and complex. Additionally, numerical simulations show that the other model parameters have an important effect on species’ spatially inhomogeneous distribution, which results in the formation of spots pattern, mixture of spots and stripes pattern, mixture of spots, stripes and rings pattern and anti-spot pattern. This may improve the model dynamics of the prey refuge on the reaction–diffusion predator–prey system.