An investigation is conducted to study analytically and numerically the effect of a magnetic field on the species separation induced by the combined effects of convection and Soret phenomenon in an inclined porous cavity saturated by an electrically conductive binary mixture and provided with four impermeable walls. The long sides of the cavity are subject to uniform heat flux while its short ends are adiabatic. Uniform magnetic field is applied perpendicularly to the heated walls. The mixture satisfies the Boussinesq approximation and the porous medium, modeled according to Darcy-Brinkman's law, is assumed homogeneous and isotropic .The relevant parameters for the problem are the thermal Rayleigh number (RT = 1 to 10 6 ), the Lewis number (Le = 10), the inclination angle of the cavity (θ = 0º to 180), the separation parameter (φ = 0.5), the Darcy number (Da = 10 -5 to 10 3 ), the Hartmann number (Ha = 0 to 100) and the aspect ratio of the cavity (Ar = 12). The limiting cases (Darcy and pure fluid media) are recovered in this study. Optimum conditions leading to maximum separation of species are determined while varying the governing parameters in their respective ranges. Results show that the magnetic field can enhance the species separation in cases where the optimal coupling between thermosolutal diffusion and convection is not achieved in its absence. On the other hand, in cases where this optimal coupling is reached in the absence of the magnetic field, the application of the latter destroys the separation of species.