The self-consistent quasiparticle model has been successful in studying QCD thermodynamics. In this model, the medium effects are taken into account by considering quarks and gluons as quasiparticles with temperature dependent masses which are proportional to the plasma frequency. The present work involves the extension of this model in the presence of magnetic fields. We have included the effect of the magnetic field by considering relativistic Landau levels. The quasiparticle masses are then found to be dependent on both temperature and magnetic field. The thermomagnetic mass thus defined allows us to obtain the thermodynamics of magnetized quark matter within the self-consistent quasiparticle model. The model then has been applied to the case of two-flavor quark-gluon plasma and the equation of state obtained in the presence of magnetic fields.