Miller, a Democrat, received 4,020 votes, according to unofficial results from the Iowa Secretary of State's office. Miller defeated his Republican opponent, Travis Harris, who received 3,324 votes.
The state office expects the results to be certified later this week.
The newly elected Miller is a Fairfield veterinarian and is also on the school board.
Joshua N. Miller of the Libertarian Party and Edward T. Hee III of the Constitution Party of Iowa also ran for the seat. Miller received 71 votes, and Hee received 58.