That same year, he was named justice of the peace. He was taken hostage in the Raid on Annapolis Royal (1781) and was released some time later in exchange for American prisoners. He was elected to the provincial assembly in a 1783 by-election held after Phineas Lovett was unseated for non-attendance. When he ran for reelection in Annapolis township in 1785, he was defeated by Stephen De Lancey. In 1786, he was named a justice in the Inferior Court of Common Pleas. Ritchie died at Annapolis Royal. His grandson William Johnstone Ritchie later served as chief justice of Canada.[1]