We obtained high-resolution spectra for 94 candidate stars belonging to the HB of M 22 with FLAMES. Previous works have indicated that this cluster has split subgiant (SGB) and red giant branches (RGB) and hosts two different stellar populations, differing in overall metal abundance and both exhibiting a Na-O anti-correlation. The HB stars we observed span a restricted temperature range (7800 < Teff < 11 000 K), where about 60% of the HB stars of M 22 are. Within our sample, we can distinguish three groups of stars segregated (though contiguous) in colours: Group 1 (49 stars) is metal-poor, N-normal, Na-poor, and O-rich: our abundances for this (cooler) group match those determined for the primordial group of RGB stars (a third of the total) from previous studies very well. Group 2 (23 stars) is still metal-poor, but it is N- and Na-rich, though only very mildly depleted in O. We can identify this intermediate group as the progeny of the metal-poor RGB stars that occupy an intermediate location along the Na-O anti-correlation and include about 10% of the RGB stars. The third group (20 stars) is metal-rich, Na-rich, and O-rich. This hotter group most likely corresponds to the most O-rich component of the previously found metal-rich RGB population (a quarter of the total). We did not observe any severely O-depleted stars and we think that the progeny of these stars falls on the hotter part of the HB. Furthermore, we found that the metal-rich population is also over-abundant in Sr, in agreement with results for corresponding RGB and SGB stars. However, we do not find any significant variation in the ratio between the sum of N and O abundances to Fe. We do not have C abundances for our stars. There is some evidence of an enhancement of He content for Groups 2 and 3 stars (Y = 0.338 ± 0.014 ± 0.05); the error bar due to systematics is large, but a consistent analysis of data for several GCs confirms that stars in these groups within M 22 are probably overabundant in He. We conclude that on the whole, our results agree with the proposition that chemical composition drives the location of stars along the HB of a GC. Furthermore, we found a number of fast rotators. They are concentrated in a restricted temperature range along the HB of M 22. Fast rotating stars might be slightly less massive and bluer than slowly rotating ones, but other interpretations are possible.