Allen was an unsuccessful candidate for reelection in 1899. After that, he was appointed and subsequently elected judge of the district court of the ninth judicial district of Nebraska and served from March 9, 1899 to December 1899, when he resigned to return to the Senate, because he was appointed to fill the vacancy caused by the death of his successor, Monroe L. Hayward. He served from December 13, 1899, to March 28, 1901, when a successor was elected; he was not a candidate for election to the vacancy.

Allen then resumed the practice of law in Madison, where was again elected judge of the district court of the ninth judicial district of Nebraska in 1917 and served until his death. He died in Los Angeles, California on January 12, 1924. He was interred in Crown Hill Cemetery at Madison, Nebraska.