Abstract In this work, we use 8 years of deep near-infrared imaging to select and study a new set of 601active galaxies identified through long-term near-infrared (NIR) variability in the UKIDSS Ultra Deep Survey (UDS). These objects are compared to 710X-ray bright AGN detected by the Chandra X-ray observatory. We show that infrared variability and X-ray emission select distinct sets of active galaxies, finding only a 37 per centoverlap of galaxies detected by both techniques and confirming NIR-variable AGN to be typically X-ray quiet. Examining the mass functions of the active galaxies shows that NIR variability detects AGN activity in galaxies over a significantly wider range of host stellar mass compared to X-ray detection. For example, at z ∼ 1, variable AGN are identified among approximately 1 per cent of galaxies in a roughly flat distribution above the stellar mass completeness limit ($>10^{9}\rm \, {\rm M}_{\odot }$), while X-ray detection primarily identifies AGN in galaxies of higher mass ($>10^{10}\rm \, {\rm M}_{\odot }$). We conclude that long-term near-infrared variability provides an important new tool for obtaining more complete samples of AGN in deep survey fields.