Ihrie was elected as a Jacksonian candidate to the Twenty-first Congress to fill in part the vacancies caused by the resignations of George Wolf and Samuel D. Ingham. He was reelected as a Jacksonian to the Twenty-second Congress. He was a member of the board of directors of the Easton Bank and died in Easton, Pennyslania. Interment in Easton Cemetery.