William Cobbett was born in Farnham, Surrey, on 9 March 1763, the third son of George Cobbett (a farmer and publican) and Anne Vincent. He was taught to read and write by his father, and first worked as a farm labourer at Farnham Castle. He also worked briefly as a gardener at Kew in the King's garden.
On 6 May 1783, on an impulse, he took the stagecoach to London and spent eight or nine months as a clerk in the employ of a Mr Holland at Gray's Inn. He joined the 54th (West Norfolk) Regiment of Foot in 1783 and made good use of the soldier's copious spare time to educate himself, particularly in English grammar. Between 1785 and 1791 Cobbett was stationed with his regiment in New Brunswick and he sailed from Gravesend to Halifax, Nova Scotia. Cobbett was in Saint John, Fredericton and elsewhere in the province until September 1791, rising through the ranks to become Sergeant Major, the most senior rank of NCO.
He returned to England with his regiment, landing at Portsmouth on 3 November 1791, and obtained his discharge from the army on 19 December 1791. In Woolwich in February 1792, he married Anne Reid, whom he had met while stationed at Fort Howe in Saint John. He had courted her by Jenny's Spring near Fort Howe.
Cobbett had developed an animosity towards some corrupt officers, and he gathered evidence on the issue while in New Brunswick, but his charges against them were sidetracked. He wrote The Soldier's Friend (1792) protesting against the low pay and harsh treatment of enlisted men in the British army. Sensing that he was about to be indicted in retribution he fled to France in March 1792 to avoid imprisonment. Cobbett had intended to stay a year to learn the French language but he found the French Revolution in full swing and the French Revolutionary Wars in progress, so he sailed for the United States in September 1792.
He was first at Wilmington, then Philadelphia by the Spring of 1793. Cobbett initially prospered by teaching English to Frenchmen and translating texts from French to English. He became a controversial political writer and pamphleteer, writing from a pro-British stance under the pseudonym "Peter Porcupine".