Scottish Conservative party leader Ruth Davidson announced her resignation on Thursday, saying she wanted to spend more time with her family.
"I fear that having tried to be a good leader over the years, I have proved a poor daughter, sister, partner and friend," Davidson said.
Davidson said she had met with Johnson privately last week and is convinced that the new PM would seek a deal for Brexit.
She said she supported Johnson in his effort to get a deal and advised MPs not to blow the chance to vote for a deal for the fourth time.
Scottish First Minister Nicola Sturgeon, from the rival Scottish National Party, said she understood Davidson's decision but speculated that Britain's political crisis was porbably also a factor in the decision.
"It is an open secret that there are probably political factors in this decision as well," Sturgeon said. "Her disagreements with Boris Johnson are well known, and I think it has been obvious for some time how uncomfortable she has been in trying to defend his leadership and the direction that he's taking the UK and particularly over Brexit."
"I mean, if we're in a situation now where the leader of the Scottish Conservatives can't reconcile herself to the extreme hard Brexit driven leadership of Boris Johnson, then why should the rest of Scotland have to reconcile ourselves to that either?" Sturgeon continued.
In her letter of resignation, Davidson wrote: "While I have not hidden the conflict I have felt over Brexit, I have attempted to chart a course for our party which recognises and respects the referendum result while seeking to maximise opportunities and mitigate risks for key Scottish businesses and sectors."
Davidson also said that she saw a credible threat from opponents to force a general election before 2021. She added that respect was missing from political debates and called for unity in UK politics.
Sturgeon said she hoped there would be a general election soon.
Davidson, 40, helped spark a resurgence in the fortunes of the Conservative Party in Scotland during her eight years in charge.
She backed Remain in the 2016 European Union referendum, and said she would continue to support the party, the prime minister and Scotland's place in the United Kingdom.