In J.M. Barrie's play Peter Pan; or, the Boy Who Wouldn't Grow Up, what was Captain Hook's name before losing his hand?
We don't know.
The text suggests that he was originally a well-known figure (known for something other than being a villainous pirate), probably from the English aristocracy:
He was often thus when communing with himself on board ship in the quietude of the night. It was because he was so terribly alone. This inscrutable man never felt more alone than when surrounded by his dogs. They were socially inferior to him.
Hook was not his true name. To reveal who he really was would even at this date set the country in a blaze; but as those who read between the lines must already have guessed, he had been at a famous public school; and its traditions still clung to him like garments, with which indeed they are largely concerned. Thus it was offensive to him even now to board a ship in the same dress in which he grappled her, and he still adhered in his walk to the school’s distinguished slouch. But above all he retained the passion for good form.
-- Chapter 14, "The Pirate Ship" (emphasis mine)
(A note on terminology: "public school" in the British sense does not mean a public-sector school; it refers to an elite group of private schools, including Eton, Winchester, Harrow, and Rugby. This is where the children of the British ruling class are educated.)
I doubt that Barrie has a particular person in mind when writing this passage; probably it was just for effect, to give Hook an air of mystique and add more depth to his character. Certainly his public-school background and adherence to "good form" does give him more depth, and (at least in my view) it's one of the more memorable things about him, making him more than just a villainous murderer. And to give him a specific name, link him to an actual real-life figure of the British aristocracy, would take away from that mystique. It's better for the story that we don't know his true name; then each reader can exercise their own imagination to come up with whichever possibility would be most interesting or scandalous for them.
I read somewhere (cannot find it*) that Barrie, being a Scotsman, had as a youth idolized Captain James Cook, who though born in England, was the son of a Scotsman. Cook was killed while in Hawaii, a somewhat mysterious unknown island at the time, and Barrie imagined his personal hero being forever entrapped in a mystical land. Cook also was reputedly cruel to natives, a trait shared with Hook.
*The theory gets a nod in this article, but it doesn't mention the Scottish connection I had read about earlier. http://www.literarytraveler.com/articles/jm-barrie-england/
I believe the only name ever given to Captain Hook is James and he is in some instances known as Captain James Hook. I think this is one of those situations where the character doesn't have an origin (canon) past the story they belong to and in more than one version of the tale it is even remarked that James Hook became Captain Hook before he lost the hand to the crocodile; in other words his name was always "Hook" and it's an ironic twist. The only mention I am aware of is from the original play which states that "Hook" is not his real name but that he can't reveal his real name. For me, in real world terms, that means he never had one. He has never been given one in literature (as far as I know) and so the label we are left with is James Hook. In keeping with the theme of the literature it is possible he was even lying about his surname.
"Hook" is actually a somewhat common surname and I believe either by original design or retrospectively through public opinion, the name Hook has been accepted as Captain Hook's actual surname.
It is worth noting however that the Peter Pan story is over a century old and the attention to detail in constructing a universe was very different in a time that typically wouldn't spawn multiple prequel/sequel and origin stories out of every successful IP. A label is enough for these characters who would then be fleshed out by descriptions of their attire/personality/accomplishments/etc. Captain Hook as originally imagined was probably never supposed to be more than "Captain Hook" just as the crocodile was never anything more than "The Crocodile".
I also find particularly interesting certain aspects such as the name of his ship, "Jolly Roger". It can give the impression that the focus was more on cuteness (for want of a better term) than historical accuracy.