It was caused primarily by the poor economic conditions as well as the prevalent racial segregation and discrimination in the Southern states where Jim Crow laws were upheld. ... For blacks, the migration meant leaving what had always been their economic and social base in America and finding a new one.
WW1 caused a shortage of labor in the northern factories and people migrated to take advantage of new job opportunities, modern facilities of the cities and better education.
The railroads, during the civil war the north had a good amount of railroads and so did the south mainly used for reinforcements but they were also a good way to transport goods