Maoist supporters of the prime minister said the president acted unconstitutionally and have vowed to call mass street protests on Tuesday.
Amid the escalating tensions leaders of Nepal's political parties met in a bid to form a coalition government.
A statement issued by the president's office said parties have until Saturday
to come forward and stake their claims.
Maoist supporters meanwhile have vowed to shut down parliament to protest the president's action.
The party has strong support in rural Nepal and is thought to be able to calls tens of thousands of people onto the streets of Kathmandu and other cities.
"We have decided to begin mass protests ... and stall parliament until the president takes back his decision," Nath Sharma, the party spokesman, said.
Officials said the president asked the prime minister to stay on in a caretaker position until a new government is formed.
|Pro-Maoist supporters have threatened to stage more protests [EPA]
But Dev Gurung, a senior Maoist official, said the party was taking to the streets until the army chief was ousted.
"Civilian supremacy has been violated and we are not going to tolerate this," he said, threatening a repeat of the kind of protests the Maoists used to undermine Nepal's former king.
The government fired General Rookmangud Katawal, the army chief, for refusing to integrate former Maoist rebels into the regular army under the terms of a 2006 peace deal that ended a decade of civil war.
But the president who is also a member of the main opposition party told the head of the army to remain in his position.
"The move by the president is an attack on this infant democracy and the peace process," Dahal said, accusing the president of having taken an "unconstitutional and undemocratic decision".
"The interim constitution does not give any right to the president to act as a parallel power," he said.
Concerns have grown over what the dispute will mean for the peace deal, which brought the Maoists into the political mainstream and ended their bloody decade-long "people's war".
The Maoists won landmark elections last year and forced the abdication of the king.
Since then they have been pushing to finalise the peace process by having their former fighters incorporated into the military.
"The move by the president is an attack on this infant democracy and the peace process"
Pushpa Kamal Dahal
But the army views the former Maoist fighters as politically indoctrinated and has refused to absorb them.
Subina Shrestha, Al Jazeera's correspondent in Nepal, said the latest crisis stems from a long-running row between the government and the army.
One of the main points of the peace agreement was that the 19,000 members of the Maoist's People's Liberation Army were supposed to be incorporated into the national army, but that has not happened.
But the army has been against the move and has been resisting for a long time.
The army also accuses the Maoists of not fulfilling their commitments to return property seized during the civil war and disband its youth wing, the Young Communist League.