Thomas McKean Pettit was born in Philadelphia on December 26, 1797, to Andrew Pettit, merchant, and Elizabeth McKean. Andrew Pettit was the son of Charles Pettit, merchant, quartermaster-general of the Continental Army, delegate to the Continental Congress, and president of the Insurance Company of North America. Elizabeth McKean Pettit was the daughter of Thomas McKean, signer of the Declaration of Independence, chief justice and then governor of Pennsylvania. Both Charles Pettit and Thomas McKean were trustees of the University of Pennsylvania; McKean still held that position while his grandson was a student there.
In 1812 young Thomas McKean Pettit entered the College of the University of Pennsylvania. On October 2, 1813, he was one of thirteen founding members of the Philomathean Society, Penn’s first student organization.
After graduation Pettit became a lawyer, and by 1820, he had become City Solicitor of Philadelphia. From there, Pettit moved on to become the deputy attorney general to the Supreme and Oyer and Terminer Courts of Philadelphia from 1824 to 1826. He was elected to the Philadelphia Legislature in 1830 and was also a member of the Select Council of Philadelphia in 1831. From 1832 until 1835, Pettit was Associate Judge for the District Court of Philadelphia; he was then appointed as Presiding Judge over the whole district, an office he held until 1845 when he was appointed United States District Attorney for the Eastern District of Pennsylvania.
President Martin Van Buren later named him as one of the Board of Visitors to West Point. Pettit also served as vice president of the Historical Society of Pennsylvania. He died in on May 30, 1853, the same year he was appointed director of the United States Mint.