The CMG is an award given out to long-serving members of the Foreign Office
- originally lowly colonial administrators
, but nowadays to Whitehall-bound bureaucrats who have managed to serve for more than fifteen years (or so) without messing up badly.
It is essentially an award for long service; the civil servant involved does not actually have to do anything particularly special, just hold onto his (almost certainly not her) job for long enough. Which is an art in itself.
Servants progress up to KCMG and GCMG.