In this paper we present and validate the galaxy sample used for the analysis of the Baryon Acoustic Oscillation signal (BAO) in the Dark Energy Survey (DES) Y3 data. The definition is based on a colour and redshift-dependent magnitude cut optimized to select galaxies at redshifts higher than 0.5, while ensuring a high quality photometric redshift determination. The sample covers $approx 4100$ square degrees to a depth of $i = 22.3 (AB)$ at $10sigma$. It contains 7,031,993 galaxies in the redshift range from $z$= 0.6 to 1.1, with a mean effective redshift of 0.835. Photometric redshifts are estimated with the machine learning algorithm DNF, and are validated using the VIPERS PDR2 sample. We find a mean redshift bias of $z_{mathrm{bias}} approx 0.01$ and a mean uncertainty, in units of $1+z$, of $sigma_{68} approx 0.03$. We evaluate the galaxy population of the sample, showing it is mostly built upon Elliptical to Sbc types. Furthermore, we find a low level of stellar contamination of $lesssim 4%$. We present the method used to mitigate the effect of spurious clustering coming from observing conditions and other large-scale systematics. We apply it to the DES Y3 BAO sample and calculate sample weights that are used to get a robust estimate of the galaxy clustering signal. This paper is one of a series dedicated to the analysis of the BAO signal in the DES Y3 data. In the companion papers, Ferrero et al. (2021) and DES Collaboration (2021), we present the galaxy mock catalogues used to calibrate the analysis and the angular diameter distance constraints obtained through the fitting to the BAO scale, respectively. The galaxy sample, masks and additional material will be released in the public DES data repository upon acceptance.