In 1882, Weller upset sitting Republican congressman Thomas Updegraff in the race to represent Iowa's 4th congressional district in Congress. Weller's win was assisted by several unusual events. Redistricting in 1881 had required Updegraff to run in a district that included only four counties from his former district. The Democratic candidate had dropped out of the race and thrown his support to Weller. Weller benefited from a nationwide wave of anti-Republican sentiment that would cost the party control of the U.S. House and one-fifth of its seats in that chamber. However, no other Greenback candidate won a seat in the Forty-eighth Congress, and Weller owed his election to support from the Democrats in his district, who had endorsed his candidacy. So it was only natural that he would enter the Democratic caucus in the House and support its candidate for Speaker of the House. His reward, such as it was, was a seat on the War Claims Committee and on the Agriculture Committee—neither of which he had wanted; his hope had been a spot on Banking and Currency, where he could have had the vantage point for attacking "the infamous national banking system." Weller was not exactly a diamond in the rough; he was just in the rough. Enemies called him "Calamity" Weller, a name which one source ascribed to his supposed allusion to the Civil War as "the great calamity." In fact, others claimed that it came from his long string of failures in winning public office, and the nickname stuck because, for members of the mainstream parties, it left the impression of Weller as a Luddite in a world of economic progress, or a doomsayer in a time of general prosperity. But his tariff views were very much those of the revenue reformers on the Democratic side of the aisle. As a farmer with experience in paying exorbitant prices on what he bought and getting low world-market prices for what he sold, Weller had special reasons for offering a bill to remove the duty on barbed wire. Contrary to his public image, Weller did not war on all banks, or even on the national banking system itself. He limited his objection to those banks' power to issue currency of their own, and this, too, was a position which many Democrats had long shared, and which found favor among prominent economists far from the radical camp, including Professor William Graham Sumner at Yale University. Weller also favored a bill that would allow the trade-dollar to be redeemed at the vault as bullion and to be recoined "into the dollar of the daddies." Critics pointed out that such a measure was superfluous. As presently constituted, trade-dollars already could be melted down into bullion by anyone desiring to do so, and then, under the Bland-Allison Act, converted into silver dollars. Weller soon found himself depicted as a blatherskite and upbraided for a series of quotations, some of which were taken out of context from his remarks, and some of which he had never said. Republican editors described him as the enemy of all banks and corporations, and when he charged that a cattle inspection bill had been written "in the interest of the cattle ring," was accused of having called for changes in the law to make it be exactly that. In fact, Weller had tried to amend the bill in favor of farmers and small shippers, and ultimately voted for the bill in hopes that the Senate would amend it for the better. Weller sought re-election in 1884 and had faithful support from Democrats, and though he was defeated by Republican nominee William E. Fuller, failed by barely two hundred votes. No more mainstream Democratic contender would do as well for the next six years. In all, Weller served in Congress from March 4, 1883 to March 3, 1885.
Later career and death
After leaving Congress, he was the proprietor and editor of the Farmers’ Advocate, a weekly paper in Independence, Iowa. Weller served as a delegate to the People’s Party national committee from 1890 to 1914, and served as president of the Chosen Farmers of America. Joining this Populist Party, he resisted any coalition with the Democrats and strongly opposed the party's endorsement of William Jennings Bryan for president in 1896. A "middle of the roader," as opponents of fusion were called, he led an increasingly forlorn hope in a state where Populism had never done all that well. He was twice an unsuccessful candidate for justice of the Iowa Supreme Court. He was also an unsuccessful candidate of the People’s Party for Governor of Iowa in 1901. He died on March 2, 1914 in Minneapolis, Minnesota. He was buried in Greenwood Cemetery, near Nashua in Chickasaw County, Iowa.