Born in Montgomery County, Pennsylvania, Miles was the son of James Miles and Hannah Pugh. Miles enlisted in Isaac Wayne's company, part of the Pennsylvania militia during the French and Indian War. He was wounded at the Battle of Fort Ligonier; later commanding the garrison at that fort. He was discharged and then reenlisted in Thomas Lloyd's company as a sergeant and was promoted to captain-lieutenant for the expedition to Fort Duquesne. He accepted a commission as captain in 1760 and commanded troops on Presque Isle, now Erie, Pennsylvania. After the war ended, he went into business as a wine merchant and married Catherine Wister, daughter of John Wister of Grumblethorpe, Philadelphia, PA. He also entered politics, and was elected to the House of Assembly in 1772. He was an early advocate for American independence. In the early days of the American Revolution Miles raised a militia company. When the war began in earnest, he was made colonel of the Pennsylvania State Rifle Regiment, a state unit later adopted into the Continental Army. As a senior commander on the staff of General George Washington, he took part in the Battle of Long Island, but was captured by the British while commanding a holding action that allowed Washington and the bulk of his outnumbered troops to escape. Miles was released as part of a prisoner exchange in April 1778 that included British Lt. Col. Sir Archibald Campbell. While a prisoner, he had been promoted to brigadier general of Pennsylvania troops. As part of his release, he had pledged not to again take up arms, but that did not disqualify him from command and administrative efforts against the British. He became quartermaster for the State of Pennsylvania serving under Timothy Pickering. In the summer of 1781 General Washington counted on General Miles to secure boat transport for the army as it made its way south from New York to Yorktown.
After the war
In 1789, Miles was admitted as an honorary member of the Pennsylvania Society of the Cincinnati. His post-war life included a distinguished career as a politician and public servant. He was made judge of the Appeals Court, served as an alderman and mayor of Philadelphia from 1790 to 1791. He was reelected as mayor, but declined the office. He was elected trustee for the University of Pennsylvania, resigning in 1793. He also was a member of American Philosophical Society and was very active in the First Baptist Church of Philadelphia. The town of Milesburg, Pennsylvania, was laid out by him and is named after him. As a businessman, in 1783 he operated an early sugar refinery with Colonel Jacob Morgan at 77 Vine Street in Philadelphia. Joining with financier Robert Morris, he helped underwrite the voyage of the ship Empress of China – the first American vessel to visit the Chinese mainland. In 1791, with John Patton, he co-founded of Centre Furnace in State College, Pennsylvania. Miles also is noted as being the first faithless elector, when he was pledged to vote for Federalist presidential candidate John Adams, but instead cast his vote for Republican candidate Thomas Jefferson. This was the first contested election in USA and an angry voter wrote to the Gazette of the United States, "What! Do I chuse Samuel Miles to determine for me whether John Adams or Thomas Jefferson shall be President? No! I chuse him to act, not to think!" Miles cast his other presidential vote as pledged for Thomas Pinckney. As a new member of the Democratic-Republican party, he ran for Congress twice but lost to political newcomer Federalist Robert Waln. Miles's portrait, painted by the noted American artistGilbert Stuart, is housed in the Washington, DCNational Gallery of Art. The portrait of his wife, Catherine Wister Miles, may possibly have been completed by Gilbert Stuart. It is now hanging at the Germantown, Pennsylvania home of her father, John Wister, at Grumblethorpe. Another portrait of Samuel Miles, completed by Charles Willson Peale, hangs is in the Philadelphia Museum of Art. He died on December 29, 1805 in Whitemarsh, Pennsylvania and is interred at Mount Moriah Cemetery in Philadelphia, Pennsylvania.