In Rwanda for a meeting of Commonwealth nations, Johnson was defiant, pledging to listen to voters' concerns and do more to tackle a cost-of-living crisis after what he described as "tough" results in the two so-called by-elections.
The losses - one in the Conservatives' traditional southern heartlands and in a northern English industrial seat won from Labour in the last election - suggest the broad appeal Johnson presented to win the 2019 election may be fracturing.
Fears that Johnson could have become an electoral liability may prompt lawmakers to move against him again after months of scandal over COVID-19 lockdown parties at a time when millions are struggling with rising food and fuel prices.
Johnson has so far resisted pressure to resign after he was fined for breaking lockdown rules at his Downing Street office.
This month, he survived a vote of confidence by Conservative lawmakers, though 41% of his parliamentary colleagues voted to oust him, and he is under investigation by a committee over whether he intentionally misled parliament.
"I think as a government I've got to listen to what people are saying," Johnson told broadcasters in Kigali.
At a later news conference, he said his government had the right programme to get through what he described as a "tough time" of rising inflation that included reforming transport, the housing and energy markets to ease the pressure on the public.
Following the losses in Tiverton and Honiton in southwest England, and Wakefield in the north, Conservative Party Chairman Oliver Dowden resigned in a carefully worded letter that hinted he might believe Johnson should take responsibility.
"We cannot carry on with business as usual," he said. "Somebody must take responsibility and I have concluded that, in these circumstances, it would not be right for me to remain in office," added Dowden, a long-time ally of Johnson.
Some Conservatives blamed him for running poor campaigns in both the voting areas by ignoring local concerns.
Johnson responded by saying he understood Dowden's disappointment but "this government was elected with an historic mandate just over two years ago" and he would continue to work to that end.
A Conservative party source said Johnson was not concerned about further resignations from his cabinet team of top ministers and took a swipe at the media for what they called "misreporting" of lockdown parties.
The explanations offered by Johnson and his team may do little to ease frustration in the Conservative Party.
Former Conservative leader Michael Howard told the BBC the party "would be better off under new leadership" and called on cabinet ministers to "carefully consider their positions".
A wave of cabinet resignations could be a route to force Johnson out before the next national election, expected in 2024. It could be called earlier, but U.S. bank Citi said in a note the likelihood of that was "limited".
Although under his party's rules Johnson cannot face another confidence motion for a year, lawmakers fearing for their own futures may try to force a change to bring about a second vote.
That might take time. It would entail changes to the committee that represents Conservative lawmakers who do not have government jobs.
The by-elections were triggered by the resignations of Conservative lawmakers - one who admitted watching pornography in parliament, and another found guilty of sexually assaulting a teenage boy.
The party lost its large majority of more than 24,000 votes in Tiverton and Honiton to the centrist Liberal Democrats.
"If Conservative MPs don't wake up, I think at the next election, the voters will send them packing," the Liberal Democrats' leader, Ed Davey, said.
In the parliamentary seat of Wakefield in northern England, the main opposition Labour party won.
"This result is a clear judgment on a Conservative Party that has run out of energy and ideas," Labour leader Keir Starmer said.
Johnson led the Conservatives to their biggest majority in three decades at the 2019 national election, winning in traditionally Labour-voting areas in north and central England.
But the loss of Wakefield could indicate that his ability to repeat that trick has been compromised.