Peartree began his career as a planter in Jamaica in the Caribbean and, during King William's War with France, had success as a privateer. After Port Royal, Jamaica sank into the sea in the earthquake of 1692, Peartree moved back to New York City much enriched from his depredation upon Spanish and French shipping. When Queen Anne's War began in 1702, William Peartree was elected mayor in 1703, as New Yorkers saw fit to elect an experienced naval captain to defend the town. He served as mayor until 1707 and died in 1714.