There was a black African samurai called Yasuke that served warlord Oda Nobunaga. He was the first foreign samurai and the inspiration for the main character in Afro Samurai.