We present a study of the evolved stellar populations in the dwarf spheroidal galaxy Leo II , based on JHK _ { s } observations obtained with the near-infrared array WFCAM at the UKIRT telescope . Combining the new data with optical data , we derived photometric estimates of the distribution of global metallicity [ M/H ] of individual red giant stars from their V - K _ { s } colours . Our results are consistent with the metallicities of RGB stars obtained from Ca ii triplet spectroscopy , once the age effects are considered . The photometric metallicity distribution function has a peak at [ M/H ] = -1.74 ( uncorrected ) or [ M/H ] = -1.64 \pm 0.06 ( random ) \pm 0.17 ( systematic ) after correction for the mean age of Leo II stars ( 9 Gyr ) . The distribution is similar to a Gaussian with \sigma _ { [ M / H ] } = 0.19 dex , corrected for instrumental errors . We used the new data to derive the properties of a nearly complete sample of asymptotic giant branch ( AGB ) stars in Leo II . Using a near-infrared two-colour diagram , we were able to obtain a clean separation from Milky Way foreground stars and discriminate between carbon- and oxygen-rich AGB stars , which allowed to study their distribution in K _ { s } -band luminosity and colour . We simulate the JHK _ { s } data with the trilegal population synthesis code together with the most updated thermally pulsing AGB models , and using the star formation histories derived from independent work based on deep HST photometry . After scaling the mass of Leo II models to the observed number of upper RGB stars , we find that present models predict too many O-rich TP-AGB stars of higher luminosity due to a likely under-estimation of either their mass-loss rates at low metallicity , and/or their degree of obscuration by circumstellar dust . On the other hand , the TP-AGB models are able to reproduce the observed number and luminosities of carbon stars satisfactorily well , indicating that in this galaxy the least massive stars that became carbon stars should have masses as low as \sim 1 M _ { \odot } .