Thermosolutal convection in a square cavity filled with air and submitted to an inclined magnetic field is investigated numerically. The cavity is heated and cooled along the active walls with a mass gradient whereas the two other walls of the cavity are adiabatic and insulated. Entropy generation due to heat and mass transfer, fluid friction and magnetic effect has been determined in transient state for laminar flow by solving numerically the continuity, momentum energy and mass balance equations, using a Control Volume Finite-Element Method. The structure of the studied flows depends on four dimensionless parameters which are the Grashof number, the buoyancy ratio, the Hartman number and the inclination angle. The results show that the magnetic field parameter has a retarding effect on the flow in the cavity and this lead to a decrease of entropy generation, Temperature and concentration decrease with increasing value of the magnetic field parameter.