Magnetic field induced antiferromagnetic phase of the underdoped cuprates is studied within the t-t-J model. A magnetic field suppresses the pairing amplitude, which in turn may induce antiferromagnetism. We apply our theory to interpret the recently reported quantum oscillations in high magnetic field in ortho-II YBa2Cu3O6.5 and propose that the total hole density abstracted from the oscillation period is reduced by 50% due to the antiferromagnetism.