This paper presents a survey of X-ray-selected active galactic nuclei (AGNs) with optical spectroscopic follow-up in a ~18deg^2^ area of the equatorial XMM-XXL north field. A sample of 8445 point-like X-ray sources detected by XMM-Newton above a limiting flux of F_0.5-10keV_>10^-15^erg/cm2/s was matched to optical (Sloan Digital Sky Survey, SDSS) and infrared (IR; WISE) counterparts. We followed up 3042 sources brighter than r=22.5mag with the SDSS Baryon Oscillation Spectroscopic Survey (BOSS) spectrograph. The spectra yielded a reliable redshift measurement for 2578 AGNs in the redshift range z=0.02-5.0, with 0.5-2keV luminosities ranging from 10^39^-10^46^erg/s. This is currently the largest published spectroscopic sample of X-ray-selected AGNs in a contiguous area. The BOSS spectra of AGN candidates show a distribution of optical line widths which is clearly bimodal, allowing an efficient separation between broad- and narrow-emission line AGNs. The former dominate our sample (70 per cent) due to the relatively bright X-ray flux limit and the optical BOSS magnitude limit. We classify the narrow-emission line objects (22 per cent of the full sample) using standard optical emission line diagnostics: the majority have line ratios indicating the dominant source of ionization is the AGN. A small number (8 per cent of the full sample) exhibit the typical narrow line ratios of star-forming galaxies, or only have absorption lines in their spectra. We term the latter two classes 'elusive' AGN, which would not be easy to identify correctly without their X-ray emission. We also compare X-ray (XMM-Newton), optical colour (SDSS) and and IR (WISE) AGN selections in this field. X-ray observations reveal, by far, the largest number of AGN. The overlap between the selections, which is a strong function of the imaging depth in a given band, is also remarkably small. We show using spectral stacking that a large fraction of the X-ray AGNs would not be selectable via optical or IR colours due to host galaxy contamination. A substantial fraction of AGN may therefore be missed by these longer wavelength selection methods.