Ogle was elected as a Democratic-Republican to the Fifteenth Congress. He was not a candidate for renomination in 1818. He served again as a member of the Pennsylvania House of Representatives from 1819 to 1823, and served as a member of the Pennsylvania State Senate for the 22nd district in 1827 and 1828. He died in Somerset in 1832 and was interred in Union Cemetery.[4]