"There is no meaning of giving continuity to my government if it failed to make concrete progress in the peace process," the Prime Minister told a select group of journalists in the capital.
Khanal, who was elected the prime minister on February after 17 rounds of elections in Parliament, said that he would quit if the major works related to the 2006 landmark peace process were not completed by August 13.
"It will be my political and moral duty to quit the government if I fail to prepare an environment of trust to accomplish the fundamental tasks on the peace process," he underlined.
"My exit will be to allow for reconsideration of the political alliance, taking new initiative for the implementation of the five point deal and opening of the outlet to the existing deadlock."
Khanal's announcement on Monday to quit came hours after he inducted new ministers into his cabinet amid an ultimatum from the Maoists, his main ally, to pull out of the government if he failed to reshuffle the six-month old ministry within 24-hours.
Ten ministers, including nine from the Unified Communist Party of Nepal-Maoist party, the largest party in the coalition, were sworn in amid a power struggled in the Maoist party.
The withdrawal of Maoists support would have led to the collapse of Khanal's administration.
Nepali Congress, which has been disrupting the parliament for the last six days, today demanded the resignation of Khanal for his failure to implement the May 29 five-point deal reached among the major political parties.
The pact includes concluding the stalled peace process, expediting constitution writing process, integration of the former Maoists' combatants housed in different camps and resignation of Khannal to pave way for a national unity government.
Khanal told mediapersons on Monday that he was ready to quit if a national consensus is forged on a national unity government.
He said his government aims to complete the tasks relating to determining number, modality and rehabilitation package of former Maoists combatants within this month in an attempt to conclude the peace process.
Meanwhile, top Maoist leader Mohan Vaidya "Kiran" has claimed that the former rebels should get another chance to lead the next national consensus government with the inclusion of the Nepali Congress and Communist Party of Nepal-Unified Marxist Leninist.
Khanal said his CPN-UML party has decided to support Maoist deputy leader Baburam Bhattarai for the prime minister's post if the next government is formed under the leadership of the former rebels.
"We are ready to discuss issues relating to formation of a national consensus government to resolve the current issue, he said.
Khanal was elected the prime minister on February 3 after 17 attempts over a seven months period with the crucial support of the Maoists.'Why should the Prime Minister be immune?'
Anti-India rhetoric intensifies in Nepal
Opposition taking mileage on Lokpal issue: Pranab
What Katrina Kaif and Imran Khan have in common
India to once again broker peace in Nepal