Farmar was born in New Brunswick, New Jersey, the son of Thomas and Anne Farmar, a prominent family in New Jersey. He came from a very large family consisting of nine boys and three girls. As a young boy he was sent to England to become educated and returned to the American colonies around 1739. Upon returning he quickly began to rally support for Great Britain.
Enlistment of men
On April 16, 1740 New Jersey governor Lewis Morris issued a public proclamation in the local newspaper: Farmar and his father answered the call and began recruiting a company of men. On August 2, 1740 he submitted paperwork indicating that his company was full. However a subsequent inquiry found that his company was not complete and erroneously listed twelve men from another company. He was denied commission until he could prove that he recruited an entire company of men. A British officer was appointed to resolve the situation and ordered him to march his company to New Brunswick for inspection. He passed the inspection on August 8, 1740 and received his certified commission.
West Indies
After successfully recruiting his men he marched them south and waited for deployment. They arrived and boarded waiting vessels on September 30, 1740 but were delayed as more supplies were brought on board. On October 14, 1740 they set sail for Jamaica and arrived sometime in mid-November. Farmar received his captain's commission on January 10, 1741 as he fought alongside the British regulars across the West Indies until the war ended in 1748.
On March 5, 1762 the 34th Regiment of Foot sailed from England across the Atlantic and arrived at Havana a few months later on June 6. They immediately began fortifying the beachhead and erecting artillery batteries with defensive entrenchments. Early in the morning on July 22, 1762 the Spaniards launched a surprise attack against the position held by Farmar. He was fully prepared for the attack and immediately countered by sending 150 redcoats to defend the post. The surprise attack lasted a little over an hour and failed, costing the Spaniards 500-600 lives compared to the British loss of around 120 men. An engineer from the 34th Regiment named Archibald Robertson described the aftermath: The British had successfully defended the position and the artillery batteries were completely intact. A week later the batteries opened fire with an unending bombardment. The city surrendered on August 16, 1762. A few months later the Treaty of Paris was signed and Farmar was sent to Mobile, Alabama.
Fort Charlotte
Farmar arrived at Fort Condé on October 20, 1763 and immediately accepted the surrender of the fort. The fort was renamed Fort Charlotte in honor of Queen Charlotte of Mecklenburg-Strelitz. He declared that all of the inhabitants of West Florida were subjects of England and demanded that they take an oath of allegiance to the British Crown. Farmar served as an interim governor of Mobile for about a year and was succeeded by George Johnstone.
Court martial
Johnstone and Farmar did not get along. The disagreements escalated quickly and Farmar was accused of embezzlement and misuse of government funds. After a long trial that was held in Pensacola he was acquitted and sailed back to England. Upon returning he found that he had lost his commission and would not be serving as governor of the British West Florida colony.
Mobile
Farmar returned to Mobile to retire and join the planter class. He was elected to the General Assembly five times and served as a justice of the peace for three terms.