Caroline Johnson said she was "truly honoured" to be elected MP for Sleaford and North Hykeham after securing a majority of 13,144 in Thursday's by-election.
The Conservative candidate's victory followed the resignation of Stephen Phillips, who stepped down over "irreconcilable policy differences" with the government over Brexit.
Sleaford and North Hykeham had been widely expected to go to the Tories, but the result is a blow for Labour which has slipped from second place in the 2015 general election.
Dr Johnson, a consultant paediatrician, won 17,570 votes, or 53.51% of the vote.
Her nearest challenger was Ukip's Victoria Ayling, who secured 4,426 votes - a share of 13.48%.
In third place was Ross Pepper of the Liberal Democrats, with Labour's Jim Clarke in fourth.
In her acceptance speech Dr Johnson said: "I look forward to strengthening the government's majority in parliament so Theresa May, our prime minister, can get on with the job of triggering Article 50, leaving the European Union and building a country and economy that works for everyone.
"I'm truly honoured to be elected to serve as a member of parliament for my home Sleaford and North Hykeham, and I hope to serve you for a long time to come."
After giving her speech at the One NK leisure centre in North Hykeham, Dr Johnson was whisked away by aides and did not stop to speak to reporters.
Ukip's new leader Paul Nuttall said the vote was a "great result" for his party.
"If someone would have offered me second place at the beginning of the campaign, considering we were in the middle of a leadership election and the party resembled a bit of a shambles over the summer, I would have bitten their hand off," he said.
Ms Ayling said her second place was an "endorsement" of the recently elected party chief.
She said: "This is a great endorsement of his leadership and how we can go forward as a united party to not just come second in the future, but first, and get MPs elected to Westminster for Ukip."
Labour MP Vernon Coaker said: "It was a difficult seat. Let's remember this is a safe Tory seat, Ukip came here expecting to do much better than they did so it's a bad result for them. But clearly for us, this was not the result we might have hoped for."