Born in New Castle, Delaware, in 1794, McKennan later moved with his family to Washington, Pennsylvania. He graduated from Washington College in 1810 and was admitted to the bar in 1814, commencing practice in Washington. He was deputy attorney general of Pennsylvania from 1815 to 1816 and was later elected to the twenty-second congress in 1830. He served in the United States House of Representatives from 1831 to 1839 and again from 1842 to 1843 as both an Anti-Masonic and Whig. He was the chairman of the Committee on Roads and Canals in the twenty-seventh congress. Despite immense pressure from associates, friends, and the Washington County Whig Party, McKennan refused to run for another term in Congress, declaring that he had done his duty by serving in public office, and it was time to return to Washington, Pennsylvania, and focus on his law practice. In 1848, he served as president of the Pennsylvania electoral college.
Upon Millard Fillmore becoming President of the United States, McKennan was offered the position of United States Secretary of the Interior, but was reluctant to accept; only after intense pressure from friends and associates did he relent. Almost immediately, he regretted his decision, and resigned after a tenure of only only 11 days. During his brief time as Secretary, McKennan was the head of the 1850 Census, which was being conducted that summer, and he issued a remarkably foresighted statement on the importance of protecting individual privacy:
Information has been received at this office that in some cases unnecessary exposure has been made by the assistant marshals with reference to the business and pursuits, and other facts relating to individuals, merely to gratify curiosity, or the facts applied to the private use or pecuniary advantage of the assistant, to the injury of others. Such a use of the returns was neither contemplated by the act itself nor justified by the intentions and designs of those who enacted the law. No individual employed under sanction of the Government to obtain these facts has a right to promulgate or expose them without authority.
...all marshals and assistants are expected to consider the facts intrusted to them as if obtained exclusively for the use of the Government, and not to be used in any way to the gratification of curiosity, the exposure of any man’s business or pursuits, or for the private emolument of the marshals or assistants, who, while employed in this service, act as the agents of the Government in the most confidential capacity.
Following his resignation, McKennan took on a less stressful job as president of the Hempfield Railroad, which was then under construction between Wheeling, Virginia, and Greensburg, Pennsylvania, through his own town of Washington (in 1871, the Baltimore and Ohio Railroad purchased the financially-hobbled Hempfield). McKennan died on July 9, 1852 in Reading, Pennsylvania, whilst on Hempfield Railroad business, and he was interred at Washington Cemetery in his long-time home of Washington, Pennsylvania.