Because this has come up a few times in my hearing lately.
Yes, there absolutely were. In fact, the estimate is that one in four cowboys was, in fact, African-American. So, how did that happen?
There were a few ways, but the major one was that during the Civil War, a lot of whites went to fight...and left their slaves to tend the cattle. The slaves developed the skills and then once they were free took jobs as skilled hands.
And they found that the cowboys didn't care. White, black, Hispanic, Native American - as long as you could do the job. It only lasted for the era of mass cattle drives and the black cowboys have been mostly erased from history, pushed out of rodeos (although many black riders compete now, they were excluded for a while) and forgotten. But if you're writing westerns or weird west - remember, there were plenty of black faces under those hats.