We present cosmological results from the final galaxy clustering data set of the Baryon Oscillation Spectroscopic Survey, part of the Sloan Digital Sky Survey III. Our combined galaxy sample comprises 1.2 million massive galaxies over an effective area of 9329 deg^2 and volume of 18.7 Gpc^3, divided into three partially overlapping redshift slices centred at effective redshifts 0.38, 0.51, and 0.61. We measure the angular diameter distance DM and Hubble parameter H from the baryon acoustic oscillation (BAO) method after applying reconstruction to reduce non-linear effects on the BAO feature. Using the anisotropic clustering of the pre-reconstruction density field, we measure the product DM*H from the Alcock-Paczynski (AP) effect and the growth of structure, quantified by f{sigma}8(z), from redshift-space distortions (RSD). We combine measurements presented in seven companion papers into a set of consensus values and likelihoods, obtaining constraints that are tighter and more robust than those from any one method. Combined with Planck 2015 cosmic microwave background measurements, our distance scale measurements simultaneously imply curvature {Omega}_K =0.0003+/-0.0026 and a dark energy equation of state parameter w = -1.01+/-0.06, in strong affirmation of the spatially flat cold dark matter model with a cosmological constant ({Lambda}CDM). Our RSD measurements of f{sigma}_8, at 6 per cent precision, are similarly consistent with this model. When combined with supernova Ia data, we find H0 = 67.3+/-1.0 km/s/Mpc even for our most general dark energy model, in tension with some direct measurements. Adding extra relativistic species as a degree of freedom loosens the constraint only slightly, to H0 = 67.8+/-1.2 km/s/Mpc. Assuming flat {Lambda}CDM we find {Omega}_m = 0.310+/-0.005 and H0 = 67.6+/-0.5 km/s/Mpc, and we find a 95% upper limit of 0.16 eV/c^2 on the neutrino mass sum.