Assuming you are referring to fairly contemporary rural migration, I can comment on this phenomenon in the United States, its causes and effects. Someone else may be able to weigh in on this trend in other countries.
First, while throughout most of history migration has been largely from the rural to the urban in most of the world, I think two factors are largely responsible for migration from the urban to the rural. One of these factors is urban gentrification. In many cities in the United States, areas that were once marginal or poor have experienced substantial investment and improvement. This has led to rising prices and an influx of wealthier people, who can now find the amenities of urban life in safe, luxury housing. Those who had been the inhabitants of these neighborhoods can no longer afford to live there. Many of these inhabitants are African-American, and they are now finding more affordable housing in the suburbs. As a result of this, we have a new version of white flight, with suburbanites, previously overwhelmingly white, fleeing further away from the city to get away from African-Americans. The second factor is a disenchantment with urban and suburban life, the "back to the earth" kinds of people, the survivalist kinds of people, and just everyday people who want more space and air than the city or suburbs can afford them, as well as cheaper land and lower taxes. So, while migration from rural to urban continues, there is this counter-movement occurring simultaneously.
There are winners and losers, of course, for cities. Obviously, the losers are the people who have been gentrified out of the urban area. Little, if any, provision is made for them, and their community life is disrupted, scattering them to wherever they can afford to go, sometimes with just thirty days' notice. The wealthy who move into cities are winners, with great new or rehabilitated housing, museums, art galleries, libraries, theaters and restaurants almost at their fingertips. Urban life can be very pleasurable. Cities themselves have a great deal to gain. Their tax bases are greatly improved, and their reputations are enhanced, which draws even more people of means and new businesses to the city. Gentrification often feeds upon itself.
At this very moment, all of this is happening in my own metropolitan area. Not being poor or displaced and not being wealthy, I watch this phenomenon from somewhere in the middle, seeing both sides of the story. On the whole, this trend is good for cities, except for those whose live are disrupted by it, but it has created suburban and rural poverty, which should be of concern to all of us. We will have cities that are thriving, surrounded by belts of poverty, with all of the social problems that poverty creates. I picture something like medieval cities with walls all around them, not a good picture. It would make so much more sense to address the problems that we are creating before we ever get to that point.