James Madison Porter (January 6, 1793 – November 11, 1862), a Pennsylvanian, was the 18th United States Secretary of War and a founder of Lafayette College.
Porter was born near Norristown, Pennsylvania on January 6, 1793 to General Andrew Porter of the Revolutionary War. As a child he was home schooled, but he later attended Norristown Academy. In 1809 he had begun to study law in an office in Lancaster, Pennsylvania and later join his brother, Judge Robert Porter, to study in Reading, Pennsylvania. He moved to Philadelphia, Pennsylvania to become a clerk in the prothonotary's office in 1812. He helped raise and manage a volunteer militia company to garrison at Fort Mifflin and advanced to the rank of colonel. In 1813 he was admitted to the bar and began the practice of law. He was appointed attorney general for Northampton County, Pennsylvania and married his wife Eliza Michler (1803–1866) in 1821. Porter was instrumental in the founding of Lafayette College and was president of its board of trustees from 1826 to 1852 and professor of jurisprudence and political economy 1837 to 1852. In 1839 he was appointed to the vacancy as president judge of the twelfth judicial district. In 1843 President John Tyler appointed him to be Secretary of War serving for about eleven months. The years that followed after his time as Secretary of War, Porter was elected to the Pennsylvania House of Representatives in 1849, served as chairman of the judiciary committee and served as president judge of the twenty-second judicial district from 1853 to 1855. Porter was president of two railroad companies for some time, the Delaware, Lehigh, Schuylkill and Susquehanna Railroad Company from 1847 to 1856 as well as the Belvidere Delaware Railroad.
He died in Easton, Pennsylvania on November 11, 1862. He is buried with his wife, Eliza, who died on March 2, 1866, in Easton Cemetery in Easton, Pennsylvania.