He was once a sea-captain from Spain, and he and his crew acquired a treasure from the People of the Gold Sun. The ship was lost, though a model of it (which contained clues to its whereabouts) somehow wound up in Scrooge's collection.
El Capitan has spent centuries seeking the map to his lost gold, living through sheer force of will and his all-consuming greed for gold. He eventually learned of the map's location but couldn't get it himself. So he broke the Beagle Boys out of jail and promised them some of the treasure if they stole the map.
The Beagle Boys managed to steal the map, but Huey, Dewey and Louie were able to bring it back to Scrooge, after which the Beagle Boys wound up back in jail. El Capitan then formed a partnership with Flintheart Glomgold, who bought a chocolate factory (where a piece of chocolate had an imprint of the map in it) from Scrooge. They followed Scrooge and Huey, Dewey and Louie until at last they all found the treasure ship but the two partners in crime forced Scrooge and the boys at cannon-point into a lifeboat.
Things went south when Glomgold, as an insult, tossed Scrooge one gold coin which infuriated El Capitan due to his greed, causing the old captain to turn his cannon on his partner. They fought until the cannon went off and it sunk the ship. Glomgold was picked up by Scrooge while El Capitan was presumed to have drowned. But he survived, vowing revenge.
El Capitan managed to find his way to the Valley of the Golden Suns at around the same time Scrooge and his group arrived there themselves. Following them into the Valley, El Capitan eventually corners them right after Scrooge makes the mistake of setting off the curse of the valley. Scrooge and El Capitan, both under the effects of gold fever, begin fighting for all the gold in the valley, but Scrooge eventually snaps out of his fever and manages to escape with his companions. They take El Capitan with them, despite that he wants to be left with "all the pretty gold". After everyone makes it out of the destructing Valley, El Capitan breaks loose, but when he comes to the spot where the Valley would be, he finds that it it is now all buried under a mountain of dirt. Frustrated yet undaunted, El Capitan starts trying to dig up the gold.