Conservative candidate Jill Mortimer beat the Labour candidate by15,529 votesto 8,589, securing what less than a decade ago would have been seen as impossible feat of dislodging the main opposition Labour Party from one of its heartland seats in northern England.
The overwhelming victory, which gives Johnson an even larger majority in parliament, will increase pressure on Labour leader Keir Starmer, who has faced criticism for not fulfilling his pledge to revive the party's fortunes after a 2019 election disaster.
"This is a historic result," said Conservative Party Co-Chairman Amanda Milling after the ballot count on Friday.
The vote was triggered by the resignation of a Labour lawmaker in March, and is one of dozens of elections which took place on Thursday.
They range from votes for local councils to those for parliament in Scotland, England and Wales, gauging support for Britain's two main parties and in Scotland's case, the depth of backing for its leading party's push for independence.
The results of the other contests will come out over several days because COVID-19 restrictions have complicated the counts.
Winning Hartlepool further boosts Johnson and his strategy, particularly after some feared a furore over the financing of a lavish refurbishment of his Downing Street apartment could dent his popularity around the country.
An election watchdog is investigating the financing of the refurbishment, which Johnson says he paid for and in doing so, followed all the rules.
The Hartlepool result continues a trend set by Johnson in the 2019 general election when he struck directly at Labour's heartlands, the so-called Red Wall areas of northern and central England, to win a commanding majority in parliament.
Labour had tried to manage expectations over the vote, saying that Thursday's elections would always be difficult at a time of the coronavirus pandemic, which has boosted support for the government because of its rapid vaccine rollout.
But the loss is painful for Starmer, who has struggled to increase his appeal to the electorate despite heavy criticism of the Conservative government over its initial, sluggish response to the COVID crisis and possible conflicts of interest.