  Within the two-flavor Nambu--Jona-Lasinio model, we derive a self-consistent
thermodynamic potential $\Omega$ for a QCD matter in an external magnetic field
$B$. To be consistent with Schwinger's renormalization spirit, counter terms
with vacuum quark mass are introduced into $\Omega$ and then the explicit
$B$-dependent parts can be regularized in a cutoff-free way. Following that,
explicit expressions of gap equation and magnetization can be consistently
obtained according to the standard thermodynamic relations. The formalism is
able to reproduce the paramagnetic feature of a QCD matter without ambiguity.
For more realistic study, a running coupling constant is also adopted to
account for the inverse magnetic catalysis effect. It turns out that the
running coupling would greatly suppress magnetization at large $B$ and is
important to reproduce the temperature enhancement effect to magnetization. The
case with finite baryon chemical potential is also explored: no sign of
first-order transition is found by varying $B$ for the running coupling and the
de Haas-van Alphen oscillation shows up in the small $B$ region.
