In real life, the first black superhero in comic books was Marvel Comics’ T’Challa, the Black Panther (1966), followed shortly by Luke Cage, Power Man (1972) and five years later, Black Lightning at DC.
But retconn storytelling pushes the debut of black superheroes further back. When Milestone Comics introduced Icon, he was presented as an alien child crashlanded on Earth and brought up as the child of a slave in the 1860s.
In The All-Star Squadron (DC Comics), Roy Thomas retroactively created Amazing Man and posits his debut in around 1944.
Christopher Priest in Black Panther wrote about a WWII meeting between Captain America and T’Chaka, T’Challa’s father.
Astro City posits the debut of a black cop, secretly called the Black Badge who was active in the 1950s.
Depending whether or not your understanding of the ancient Egyptians allows for Afrocentric interpretation, Captain Marvel villain Black Adam is technically the oldest black villain in comics having debuted in comics in 1943 and having his origins in ancient Egypt.
Any others I’m missing?