Wilson was elected to the
Iowa House of Representatives in 1867, and served as speaker from 1870 to 1871 before becoming a professor of agriculture at what is now
Iowa State University, where he encouraged the work of
George Washington Carver. Wilson was also appointed to the Board of Trustees (now Regents) of Iowa's public higher educational institutions, serving from 1870 to 1874. In 1872, he was elected to represent
Iowa's 5th congressional district as a
Republican member of the
United States House of Representatives. It was during this time that he became known as
Tama Jim to distinguish him from the Iowa member of the senate,
James F. Wilson. In 1874, Wilson was re-elected, serving a second term, but returned to Iowa in 1877. That year he was appointed to the
Iowa State Railway Commission, where he served for six years. In 1882, he ran for Congress for the third time, this time against Democrat
Benjamin T. Frederick. Wilson seemingly defeated Frederick in a very close race, but Frederick soon contested the election in the U.S. House. Wilson had been issued an election certificate by the State of Iowa, enabling him to be seated during the contest. The 1882 elections gave Frederick's Democratic Party control of the House. Through a prolonged evidentiary proceeding in 1883, followed by
filibusters that delayed resolution of the contest until the final hours of the
Forty-eighth Congress, Wilson's Republican Party colleagues enabled him to retain in office until the final minutes before the end of the final session. Then, Wilson consented to end the filibuster against a vote on the contest, because it was also blocking action on a popular bill to enable former President
Ulysses S. Grant to enjoy the financial benefits of a military retirement. On March 4, 1885, with
Grover Cleveland's inauguration festivities already starting, the House declared Frederick the winner of the 1882 race, unseated Wilson, seated Frederick, passed the Grant retirement bill, then adjourned. Returning to Iowa from Washington for the second time, Wilson rejoined the faculty at Iowa State, where he would serve as
Professor (now Dean) of Agriculture and director of the agricultural experiment station from 1890 to 1897. ==Secretary of Agriculture==