The low-energy QCD theorems are generalized in the presence of a constant magnetic field H. Two-loop approximation for the vacuum energy density in the framework of the chiral perturbation theory was obtained and the quark and gluon condensates were found as the functions of H.