  The Dark Energy Spectroscopic Instrument (DESI) survey will measure
large-scale structures using quasars as direct tracers of dark matter in the
redshift range 0.9<z<2.1 and using Ly-alpha forests in quasar spectra at z>2.1.
We present several methods to select candidate quasars for DESI, using input
photometric imaging in three optical bands (g, r, z) from the DESI Legacy
Imaging Surveys and two infrared bands (W1, W2) from the Wide-field Infrared
Explorer (WISE). These methods were extensively tested during the Survey
Validation of DESI. In this paper, we report on the results obtained with the
different methods and present the selection we optimized for the DESI main
survey. The final quasar target selection is based on a Random Forest algorithm
and selects quasars in the magnitude range 16.5<r<23. Visual selection of
ultra-deep observations indicates that the main selection consists of 71%
quasars, 16% galaxies, 6% stars and 7% inconclusive spectra. Using the spectra
based on this selection, we build an automated quasar catalog that achieves a
>99% purity for a nominal effective exposure time of ~1000s. With a 310 per sq.
deg. target density, the main selection allows DESI to select more than 200
QSOs per sq. deg. (including 60 quasars with z>2.1), exceeding the project
requirements by 20%. The redshift distribution of the selected quasars is in
excellent agreement with quasar luminosity function predictions.
