Born in Boston, Massachusetts, to the Rev. Samuel Dexter, the 4th minister of Dedham, he graduated from Harvard University in 1781 and then studied law at Worcester under Levi Lincoln, Sr., the future Attorney General of the United States. After he passed the bar in 1784, he began practicing in Lunenburg, Massachusetts.