An immersed boundary method (IBM) has been developed to handle the solid body embedded flowfield simulation for compressible reactive flows, paving the way of application for a wide range of fluid–solid interaction problems. Previously, the Brinkman penalization method (BPM), originated from porous media flows, has been successfully used for incompressible Navier–Stokes equations by adding penalization terms to momentum equations. However, it is nontrivial to solve the compressible form due to the penalized continuity equation that usually poses severe numerical stiffness. In order to circumvent this issue, an extending procedure for relevant variables from the fluid to solid domain is considered, by analyzing the ordinary differential equations remained after operator splitting. Density can be then determined with the help of an equation of state (EoS). Meanwhile, efforts of enforcing the Neumann boundary condition, for example, the adiabatic wall condition, on the fluid–solid interface can be minimized by extending temperature across the interface directly. One more advantage of the extending step lies in that it can quickly reach a steady state when performed within a narrow band around the interface. Implemented into an adaptive Cartesian grid‐based flow solver for compressible Navier–Stokes equations with chemical reaction source terms, the present variable‐extended IBM is validated by numerical examples ranging from single‐species nonreactive to multispecies detonative flows in one‐ and two‐dimensional domains. Numerical results show (1) the successful specification of slip or nonslip, adiabatic or isothermal wall condition on the fluid–solid interface and (2) loss of total energy in the original BPM being avoided and the numerical accuracy being improved especially for energy‐sensitive reactive flows.