Captain Jack Sparow's autobiography Captain Jack Sparrow: You Have Heard of Me details an elaborate escape from the British Navy at Port Royal. This is confirmed in Captain Barbosa's The Code: A Set of Guidelines but the later alliance between these two Captains taints the veracity of such a confirmation. Official British Navy documentation could verify its truth, but as of yet I have been unable to find any such records.
Official documents are rare, bordering on non-existence. We do have some private journals that mention it, and modern historians use them as first and second hand accounts. The single remaining record mentions the blame for the infamous captain's escape being placed on a blacksmith. Experts are understandably skeptical of a single blacksmith being able to orchestrate the escape of a wanted man. The prevailing theory is the powers that be used a patsy to cover their incompetence and then quickly brushed the whole indecent under the rug. The pillaging of the city by pirates, which happened in the same time, no doubt helped.