In the early 19th century it was, and for a long time had been, illegal for apprentices to resign. A "runaway apprentice" could be arrested and returned to his master, to continue working for room and board and instruction until he was 21. Hiring someone else's runaway apprentice was a tort under the law, and the rightful master would sue the illicit employer and be awarded money damages.
On the web I find it asserted that in the early 19th century, two teenagers from Boston signed on as crewmen aboard a ship bound for China, and it is hinted that some illegalities were involved, and I suspect they were runaway apprentices. The story goes on to say that two years later when the ship returned to Boston, one of these two had risen to the position of captain of the ship. That makes me suspect there was a violent encounter along the way, perhaps in Polynesia, resulting in the deaths of the captain and some other officers.
I don't want to include a link to the story since it would give away spoilers to a novel inspired by this episode.
Is it possible to locate the story of what happened based on this much information?
ok, Here's a link. Near the end of the introduction by William Patterson, it is asserted that the story was inspired by this situation in the early 19th century. In Starman Jones the protagonist falsifies his work record in order to get a job aboard a starship. Patterson should not have given away the secret, but there it is.