"There is a very good chance that I would be successful in the election with Conservative Party members - and that I could indeed be back in Downing Street on Friday," Johnson said in a statement.
"But in the course of the last days I have sadly come to the conclusion that this would simply not be the right thing to do. You can't govern effectively unless you have a united party in parliament."
Johnson, who never formally announced his bid to return to Downing Street, has spent the weekend trying to persuade Conservative lawmakers to back him and said on Sunday that he had the support of 102 of them.
He needed the backing of 100 by Monday to proceed to the next stage, which would have seen him going head-to-head against Sunak in a vote by the Conservative Party's 170,000 members.
Sunak, whose resignation as finance minister in July helped precipitate Johnson's fall, had cleared the threshold of 100 lawmakers needed to progress to the next stage, securing 142 declared supporters on Sunday, according to Sky News.
He will be named leader of the Conservative Party and become prime minister on Monday unless candidate Penny Mordaunt reaches the threshold of 100 backers to force a run-off vote by party members. She had 24 declared supporters on Sunday.