From the Super Mario Wiki, the Mario encyclopedia
The legendary captain is a pirate Toad that appears in Paper Mario: Color Splash. He is a yellow Toad, and he wears a pirate hat and wields a large cutlass. He is said by the Toad Captain's crew to be the "greatest captain who's ever lived," and that all other captains admire him.
The legendary captain was the first pirate captain to ever reach Fortune Island, though only his ship returned. His ship was claimed by the Toad Captain and his crew when it came back. The legendary captain's journal was found on the ship, though the first five pages that told how to cross the Lost Sea were missing.
When Mario and the Toad Captain head to Fortune Island after finding the five journal entries, Mario finds the legendary captain cooking on a Charcoal Grill in the parallel world. When Mario squeezes the grill, the legendary captain becomes angry and begins to follow Mario around. He will follow Mario back into the normal world, where he meets the Toad Captain. The Toad Captain recognizes him as the legendary captain, and they begin talking to each other. The legendary captain reveals that he had lost his memory and does not remember why he is on the island.
When Mario defeats Wendy O. Koopa, the legendary captain, who has regained his memory, says that the treasure on Fortune Island had been claimed before he even reached the island. The Toad Captain becomes very sad when he learns that the treasure is gone, but the legendary captain tells him that he will teach him to be like him.
If Mario returns to Fortune Island after collecting the Big Paint Star, the legendary captain can be seen training the Toad Captain on the beach.