Socialist leader Pedro Sanchez has been sworn in as Spain's prime minister by King Felipe VI.
In parliament, the Basque Nationalist Party (PNV) said its five lawmakers would vote against Rajoy, who was conspicuously absent from the lower house after earlier launching a staunch defence against the motion, scheduled for Friday.
Under a Spanish law that prevents a power vacuum, Mr Sanchez would immediately become the new leader of the 19-country eurozone's fourth biggest economy and a prominent European Union leader at a time when the bloc faces numerous challenges.
The 46-year-old is Spain's seventh prime minister since the return to democracy following the death of dictator General Franco in 1975.
Parliament is to debate whether to support the Prime Minister Mariano Rajoy.The political future of Mariano Rajoy hangs in the ... As the second most voted party in the 2016 election, the Socialists proposed Sanchez, who regained the party leadership a year ago after an internal revolt that sidelined him for months.
A general election is due by mid-2020 and it is not clear whether Sanchez could call a snap vote before that.
Sanchez said on Thursday that, if his party's motion of no-confidence against Rajoy succeeded, he would resume dialogue with the government of Catalonia.
The new prime minister has vowed to fight corruption and help Spaniards affected by years of public spending cuts under Mr Rajoy's government.
"I promise, by my conscience and honor, to faithfully fulfil the obligations of the position of president of the government, with loyalty to the King, and to protect and make protected, the constitution as the fundamental law of the State", Sanchez said, as the King looked on. He heads a bloc of only 84 in the 350-seat parliament.
Rajoy imposed direct rule on the region in October after sacking its government following an independence referendum that Spanish courts declared illegal.
While the Catalonian crisis will be a major challenge for Sanchez, he can count on a positive economic cycle, with Spain enjoying one of the highest growth rates in the euro zone.
As spokesman for the government in the later years of Aznar's leadership, Rajoy shielded him from criticism over his handling of the 2002 Prestige tanker spill and Spain's participation in the 2003 invasion of Iraq.
The motion was successful after 180 deputies voted to unseat Rajoy.
If the parties vote as they say they will, only a last-minute resignation can prevent Rajoy from becoming the first Spanish prime minister to be ousted in a motion of no confidence.
Spain's Partido Popular government appeared doomed last night to lose a no-confidence vote in parliament, with the centre-left PSOE poised to take power. "The government that Pedro Sanchez will put together can only be short and transitional", it said in an editorial on Sunday.
Meanwhile, Catalonia has sworn in a new government, automatically ending a seven-month takeover by Spain's central authorities following a failed secession bid by the restive region.