The Balloon-Borne Experiment with a Superconducting Spectrometer (BESS-Polar II) flew successfully over Antarctica during 24.5 days in December 2007 through January 2008. The long duration of the flight, and the good stability of the detectors, improved by a factor of 5 the number of cosmic-ray events previously recorded with BESS-Polar I, reaching about 4.6 billion collected particles. The charge, the rigidity and the velocity of crossing particles are measured by using the various particle detectors present in the instrument. These measurements can precisely identify cosmic-ray hydrogen and helium isotopes among the incoming particles in the GeV per nucleon region, which are expected to provide important information on cosmic-ray propagation in space. The BESS-Polar II instrument and the analysis to measure cosmic-ray hydrogen and helium isotopes are presented in this paper.