The effects of a magnetic field on the route to chaos in a fluid-saturated porous layer were investigated based on the approach of dynamical systems. A low dimensional Lorenz-like model was obtained using Galerkin truncated approximation. The presence of a magnetic field helped delay the convective motion. The transition from steady convection to chaos via a Hopf bifurcation produced a limit cycle which may be associated with a homoclinic explosion at a slightly subcritical value of the Rayleigh number.