It was actually based on an actual event that occurred in Yap Island.
The 1950 novel His Majesty O'Keefe by Lawrence Klingman and Gerald Green in fact depicts a historical figure, Captain David Dean O'Keefe (ca. 1824-1921).
Born in Ireland, O'Keefe immigrated to the U.S. and settled in Savannah, Georgia. In the 1870s he traveled to the South Pacific, where he became shipwrecked on the island of Yap.
(The film fancifully depicts his crew throwing him off his own ship during a mutiny.) Eventually O'Keefe established a lucrative trade in copra, or dried coconut flesh, on the same island.
During that period Yap was occupied by both Germany and Spain; characters depicted in the novel (and film) such as Alfred Tetins, Bully Hayes, Fatumak and Boogulroo all existed in real life. http://www.tcm.com/this-mo