He was born in Amesbury, Massachusetts, fourth son of Stephen Bartlett. In 1745 he began the study of medicine under a Doctor Ordway of Amesbury. In the 1750s he opened a practice in Kingston, New Hampshire.
Dr. Bartlett eventually became interested in politics, and in 1765 was elected to the colonial assembly, where he began to oppose the policies of the royal governor John Wentworth. As a gesture of good will, the governor appointed Bartlett as justice of the peace, but to no effect; in 1774 the local assembly (meeting illegally, having been recently dissolved), appointed Bartlett and John Pickering as delegates to the Continental Congress, although Bartlett had to decline because his house had burned down. Bartlett was elected to Congress again in the following year, and able to attend thereafter.
When the question of a declaration of independence was officially brought up in 1776, as a representative of the northernmost colony Dr. Bartlett was the first to be asked, and the first to answer in favor.
He was re-elected to Congress in 1778, but partway through the session he returned to New Hampshire to attend to personal business. Subsequently he remained in the state, becoming a justice of the state supreme court in 1782 and chief justice in 1788. He was an advocate in the state for adoption of the Constitution in the following year, and was elected to be a Senator, but declined the office. In 1791 Dr. Bartlett became the President of New Hampshire; the title of the state's highest job was then changed to Governor in 1792. Bartlett resigned in January 1794 because of his declining health, and he died in the following year.
The fictional President of The West Wing, a popular television drama series, is named "Josiah Bartlet". Despite the spelling difference, the character (played by Martin Sheen) claims to be a direct descendant of the New Hampshire signer of the Declaration of Independence.