Immigration countries prefer educated immigrants. Quite obvious these immigrants are much more educated than the average population of the country they are leaving. This would imply that the (rich) immigration country is gaining human capital with the (poor) emigration country is losing human capital. This would be true if this were a zero sum game, but it is not as people react to migrations. In particular, the prospect of emigrating may increase human capital accumulation, and people may find easier access to higher education if many educated people have left. The problem with verifying these types of conjectures is that there is no clean data that would allow to see this.
Michael Clemens and Satish Chand found a clean natural experiment that allows to disentangle these effects: the massive and sudden emigration of educated people of Indian descent from Fiji after two military coups. The native population was mostly untouched, but the Indian population decreased by 40% in about 20 years. Interestingly, young Indians began investing massively in human capital as they expected local opportunities to dwindle for them. As not all left, an increase in local human capital resulted.
One direct implication of this result is the emigrating countries should not discourage emigration, to the contrary they should encourage it. If have written previously about an example of this in Finland. In that case, the hope is that some emigrants will return. And indeed, there is plenty of evidence that there is significant return migration.