In this paper, an analytical investigation of the combined effect of through flow and magnetic field on the convective instability in an electrically conducting fluid layer, bounded in a Hele-Shaw cell is presented within the context of linear stability theory. The Galarkin method is utilized to solve the eigenvalue problem. The outcome of the important parameters on the stability of the system is examined analytically as well as graphically. It is observed that the through flow and magnetic field have both stabilizing effects, while the Hele-Shaw number has destabilizing effect on the stability of system. It is also found that the oscillatory mode of convection possible only when the magnetic Prandtl number takes the values less than unity.