A lattice Boltzmann method is developed to simulate temperature-sensitive magnetic fluids in a porous cavity. In the simulation, the magnetic force, efficient gravity, viscous loss term and geometric loss term in porous medium are imported to the momentum equation. To test the reliability of the method, a validation with water in porous cavity is carried out. Good agreements with the previous results verify that the present lattice Boltzmann method is promising for simulation of magnetic fluids in porous medium. In this study, we investigate the change of magnetization with external magnetic field, and we present numerical results for the streamlines, isotherms, and magnetization at vertical or horizontal mid-profiles for different values of Ram. In addition, Nusselt numbers changing with magnetic Rayleigh numbers are also investigated.