We present baryon acoustic oscillation (BAO) scale measurements determined from the clustering of 1.2 million massive galaxies with redshifts 0.2 < z < 0.75 distributed over 9300 deg2, as quantified by their redshift–space correlation function. In order to facilitate these measurements, we define, describe, and motivate the selection function for galaxies in the final data release (DR12) of the SDSS III Baryon Oscillation Spectroscopic Survey (BOSS). This includes the observational footprint, masks for image quality and Galactic extinction, and weights to account for density relationships intrinsic to the imaging and spectroscopic portions of the survey. We simulate the observed systematic trends in mock galaxy samples and demonstrate that they impart no bias on BAO scale measurements and have a minor impact on the recovered statistical uncertainty. We measure transverse and radial BAO distance measurements in 0.2 < z < 0.5, 0.5 < z < 0.75, and (overlapping) 0.4 < z < 0.6 redshift bins. In each redshift bin, we obtain a precision that is 2.7 per cent or better on the radial distance and 1.6 per cent or better on the transverse distance. The combination of the redshift bins represents 1.8 per cent precision on the radial distance and 1.1 per cent precision on the transverse distance. This paper is part of a set that analyses the final galaxy clustering data set from BOSS. The measurements and likelihoods presented here are combined with others in Alam et al. to produce the final cosmological constraints from BOSS.