McAllister was elected as a Democrat to the Thirty-eighth Congress. Although he was a Democrat, he supported the passage of the Thirteenth Amendment. During the congressional debate, McAllister justified his new stance because he saw destroying "the corner-stone of the Southern Confederacy" as the only path to peace. He was not a candidate for renomination in 1864.
Later life and death
He resumed the manufacture of iron and died in Royer, Pennsylvania. He is interred in Mountain Cemetery.