In this work, the magnetohydrodynamics (MHD) natural convection heat transfer problem inside a porous medium filled with inclined rectangular enclosures is investigated numerically. The boundary conditions selected on the enclosure are two adiabatic and two isothermal walls. The governing equations, continuity, and Forchheimer extension of the Darcy law and energy are transformed into dimensionless forms by using a set of suitable variables, and then solved by using a finite difference scheme. The governing parameters are the magnetic influence number, the Darcy Rayleigh number, the inclination angle, and the aspect ratio of the enclosure. It is found that the magnetic influence number and the inclination angle have pronounced effects on the fluid flow and heat transfer in porous media-filled enclosures.