The international development secretary squeaked through with 37 votes.
Boris Johnson had 126 votes, Jeremy Hunt 46, Michael Gove 41, and Sajid Javid managed 33 votes. Dominic Raab only got 30 votes and is out.
Stewart, whose candidacy has electrified the contest, will square up to Johnson in a BBC TV debate on Tuesday night.
His maverick campaign has seen the former Iraq and Afghanistan diplomat engage with the public across the country and attracted hundreds to his rallies.
After the results were announced, Stewart tweeted: “Thank you all so much! Looking forward to the debate tonight @BBCPolitics #RoryWalksOn”
He added: “And thank you for all the support – we seem to have almost doubled our vote again…more to come…#walkon”
Earlier, he shrugged off speculation that he had been a spy for MI6, pointing out that members of the intelligence services are legally prevented from talking about their service.
Some polls suggested he was the most popular voters’ choice as PM after Johnson in the leadership race, even though his support among Tory members was poor.
Johnson ducked a Channel 4 TV hustings at the weekend and now faces his first test in prime time, on the BBC, up against the remaining rivals in the race to get to No.10.
Remaining candidates will face further ballots of Tory MPs later this week, with the bottom-ranked MP knocked out until only two are left.
The final two will go into a nationwide ballot of the 160,000 Tory party members, beginning on 22 June, with the winner expected to be announced about four weeks later.
Johnson, who won 114 votes on the first round, was building yet more support earlier when former Cabinet minister and ex-leadership contender Andrea Leadsom endorsed his candidacy
She told LBC that Johnson was “an election winner” who was “best placed” to take the UK out of the EU by 31 October.
This article originally appeared on HuffPost.