Numerical modeling of immiscible twoâphase flow in deformable porous media has become increasingly significant due to its applications in oil reservoir engineering, geotechnical engineering and many others. The coupling between twoâphase flow and geomechanics gives rise to a major challenge to the development of physically consistent mathematical models and effective numerical methods. In this article, based on the concept of free energies and guided by the second law of thermodynamics, we derive a thermodynamically consistent mathematical model for immiscible twoâphase flow in poroâviscoelastic media. The model uses the fluid and solid free energies to characterize the fluid capillarity and solid skeleton elasticity, so that it rigorously follows an energy dissipation law. The thermodynamically consistent formulation of the pore fluid pressure is naturally derived for the solid mechanical equilibrium equation. Additionally, the model ensures the mass conservation law for both fluids and solids. For numerical approximation of the model, we propose an energy stable and mass conservative numerical method. The method herein inherits the energy dissipation law through appropriate energy approaches and subtle treatments for the coupling between two phase saturations, the effective pore pressure and porosity. Using the locally conservative cellâcentered finite difference methods on staggered grids with the upwind strategies for saturations and porosity, we construct the fully discrete scheme, which has the ability to conserve the masses of both fluids and solids as well as preserve the energy dissipation law at the fully discrete level. In particular, the proposed method is an unbiased algorithm, that is, treating the wetting phase, the nonâwetting phase and the solid phase in the same way. Numerical results are also given to validate and verify the features of the proposed model and numerical method.