Franklin was born in Spilsby, Lincolnshire, on 16 April 1786, the ninth of twelve children born to Hannah Weekes and Willingham Franklin. His father was a merchant descended from a line of country gentlemen while his mother was the daughter of a farmer. One of his brothers later entered the legal profession and eventually became a judge in Madras; another joined the East India Company; while a sister, Sarah, was the mother of Emily Tennyson. Educated at King Edward VI Grammar School in Louth, he soon became interested in a career at sea. His father, who intended for Franklin to enter the church or become a businessman, was initially opposed but was reluctantly convinced to allow him to go on a trial voyage with a merchant ship when he was aged 12. His experience of seafaring only confirmed his interest in a career at sea, so in March 1800, Franklin's father secured him a Royal Navy appointment on HMS Polyphemus.
Commanded by a Captain Lawford, the Polyphemus carried 64 guns and, at the time of Franklin's appointment, was still at sea. He did not join the vessel until the autumn of 1800. Initially serving as a first class volunteer, Franklin soon saw action in the Battle of Copenhagen in which the Polyphemus participated as part of Horatio Nelson's squadron. An expedition to the coast of Australia aboard HMS Investigator, commanded by Captain Matthew Flinders, followed, with Franklin now a midshipman.
He was present at the Battle of Trafalgar in 1805 (aboard HMS Bellerophon), and at the Battle of New Orleans. He accompanied Captain Dance on the East India Company's ship the Earl Camden, frightening off Admiral Linois at the Battle of Pulo Aura in the straits of Malacca on 14 February 1804.
In 1819, Franklin was chosen to lead an expedition overland from Hudson Bay to chart the north coast of Canada eastwards from the mouth of the Coppermine River. On his 1819 expedition, Franklin fell into the Hayes River at Robinson Falls and was rescued by a member of his expedition about 90 metres (98 yd) downstream.
Between 1819 and 1822, he lost 11 of the 20 men in his party. Most died of starvation, but there were also at least one murder and suggestions of cannibalism. The survivors were forced to eat lichen and even attempted to eat their own leather boots. This gained Franklin the nickname of "the man who ate his boots".