The de Haas-van Alphen effect was observed in the underdoped cuprate YBa2Cu3O6.5 via a torque technique in pulsed magnetic fields up to 59 T. Above a field of approximately 30 T the magnetization exhibits clear quantum oscillations with a single frequency of 540 T and a cyclotron mass of 1.76 times the free electron mass, in excellent agreement with previously observed Shubnikov-de Haas oscillations. The oscillations obey the standard Lifshitz-Kosevich formula of Fermi-liquid theory. This thermodynamic observation of quantum oscillations confirms the existence of a well-defined, closed, and coherent, Fermi surface in the pseudogap phase of cuprates.