He was an unsuccessful candidate for reelection to fill the vacancy caused by his own resignation. Ellis was elected as a Jackson Federalist candidate to the Eighteenth Congress. He was a member of the Pennsylvania House of Representatives in 1825 and 1826.
Ellis ran unsuccessfully for re-election due to his earlier resignation, but he later won a seat in the Eighteenth Congress as a Jackson Federalist. In 1825 and 1826, he represented Pennsylvania in the state legislature.