African Americans suffered from a terrible economic hardship in the aftermath of the Civil War. The freedmen were offered hope close to the end of war, as they widely expected to legally get 40 acres of land and a mule after the official end of the military conflict. First it could have been just a rumor, but the phrase is definitely connected with the failed attempt of the agrarian reform for former slaves. General William T. Sherman issued a special order in 1865 and promised a piece of land to every black family. Unfortunately, less than a year after the order tens of thousands of black landholders were dispossessed and the land was returned to its previous owners.

More Info: en.wikipedia.org