Cooke was a confidential adviser of Lord Bellomont, who became Governor of Massachusetts in 1699. He lost his judicial appointments in 1702 when Joseph Dudley became governor; Dudley took revenge on Cooke for being a member of the council which had committed him to prison in 1689. This had occurred after the 1689 Boston revolt, which deposed Sir Edmund Andros, governor of the Dominion of New England, and other officials (including Dudley). Cooke served on the rebel council that took power after the dominion's overthrow.