"After running unsuccessfully for Pennsylvania's General Assembly (the Pennsylvania House of Representatives) in 1797, in a race in which he placed fifth out of eight candidates, garnering just 155 votes compared to the 306 earned by that year's winner, David Krause, Ley succeeded in being elected to that body before the decade was over.From 1799 to 1802, he represented Lebanon and Dauphin counties in the General Assembly, and was then appointed to fill the Pennsylvania Senate seat which had been vacated by John Kean, serving in that capacity between 1805 and 1806.