The polls are closed during the Wakefield and Tiverton and Honiton by-elections.
Both seats were held by the Conservatives before their previous MPs resigned in disgrace, triggering by-elections.
Results are expected to be announced overnight.
The polls are considered an important test for the prime minister Boris Johnsonleadership after 148 of his own MPs voted against him in a confidence mood†
The counting begins as PM faces a nervous night – follow the latest updates
Asked if he would consider his position if he lost both midterm elections, the prime minister said: “I will follow the results with interest.”
Though “always optimistic and cheerful,” the prime minister warned: “I think most seasoned political observers like you know that mid-term by-elections are never necessarily easy for a government.”
In Wakefield, West Yorkshire, Ex-Conservative MP Imran Ahmad Khan resigned after being found guilty of sexually assaulting a 15-year-old boy and 18 months in prison.
Once one of the so-called Red Wall seats, it was won by the Tories in the 2019 general election, though Labor now hopes to take it back.
In Tiverton and Honiton, Devon, Neil Parish resigned after admitting he watched pornography twice on his phone in the House of Commons.
The Liberal Democrats have their sights set on the constituency and should topple a Conservative majority of 24,239.
If the Conservatives lose both midterm elections, it would be only the seventh time a government has suffered a double defeat since World War II.
Labor national campaign coordinator Shabana Mahmood said voters were returning to the party led by Sir Keir Starmer.
She said: “Labour has campaigned positively with fantastic candidates in both midterm elections, but we know that taking the seats requires many Tory voters to switch to Labour, which is more difficult in midterm elections where low turnout is common .
“Wakefield has been a fringe constituency since Labor last won a general election, and the Conservatives have had the largest majority seat since 2010 – making this an uphill task.
“As we await the results of both elections, the message we have heard is clear: many are returning to Labor led by Keir Starmer.”
The Liberals said a significant swing away from the Tories in Tiverton and Honiton, one of the party’s safest seats, could see Johnson’s MPs looking nervously over their shoulder.
Treasury spokesman Christine Jardine said: “Never in the history of British politics has such a large majority been overthrown in a by-election. We have said throughout this campaign that this is a huge mountain to climb.
“However, if the Conservative Party loses a significant number of votes tonight in one of their safest seats in the country, tomorrow there will be countless Conservative MPs looking nervously over their shoulder.”