The first Africans came to Japan in 1546 in a Portuguese ship as slaves and shipmates. But that did not impact Japanese lore as much as the black samurai who came to Japan in 1579 in the service an Italian Jesuit missionary from the Indies, India in the case of this missionary. (The term Indies was inclusive of the South East Asian areas influenced by Indian culture.)
When the young man arrived in Kyoto in 1579, he was not a samurai. He rose to be one after a powerful Japanese feudal lord, Oda Nobunaga, in the Sengoku period (1467 to 1600) took a fancy to him. He became a famous samurai known as Yasuke . After the death of his master, he became a ronin, a samurai without a master.