In the early years, after the Civil War, what how did former slaves earn a living?
For the most part, exactly as they had prior to the war.
When the Civil War ended in 1865 it spelled the end of slavery. But for those freed slaves there was no where for them to go and nothing for them to do aside from what they had done before. Many became tenant farmers working the same land they had worked as slaves. The difference being they were free, could not be forced to work, and could move around at will.
Some moved west to become cowboys. Contrary to what is depicted by Hollywood, it is estimated that a full 1/3 of all cowboys were black.
Others moved northward mostly to Chicago hoping to get better paying jobs in the stock yards and mills of that city. Other northern cities saw an influx of former slaves as well.