This is a very interesting topic.
To give an example: Iceland (yeah this small island having only 340 000 inhabitants) had suffered really bad from this phenomenon until they improved the quality of the icelandic university. Now you can study almost every subject there with high honored lecturers from all around the world. Maybe this a possibility other countries should consider too?
There is no better way than keep improving the domestic environment to retain more competent young people in their home country. In my perspective, this question is pretty simple to approach that no one is to blame providing that young generation need good workplace, fair pay and well-founded social system to support their creativity and development.
Ask those rotten officials how much they have done and contributed to the country where many talents were forced to leave their countries for better life quality and seek for minimal dignity, you would get the answer to the root of the problem.
In response to Mehdi
I do not think education system is the main issue to be tackle despite education is the precondition of good work. On the contrary I do believe better work opportunity and proper social system are much more important than anything else. Without social support to young generation to seek for better works, even they are well-educated with ambition and creativity, they will eventually be brain drained without question chiefly because they perceive there will be even better work opportunities and favorable social welfare to support their development.