D. They migrated to the northeast and Midwest to work in factories.
After the Civil War, many African Americans faced hostility and oppressive conditions in the South, leading to significant migration to northern industrial cities. This movement, often referred to as the Great Migration, was motivated by the search for better economic opportunities and escaping the systemic racism and violence prevalent in the South.