Sharif's remarks came at a time when opposition leader Imran Khan was demanding his resignation as he claimed that last year's elections were rigged, Xinhua reported.
The announcement came just one day ahead of the protests planned by Imran Khan and influential cleric Tahirul Qadri.
The Pakistan Muslim League-Nawaz (PML-N) had won the parliamentary elections in May last year.
Khan has planned an anti-government march Aug 14 in Islamabad.
He said his supporters will not end protests unless Sharif resigns.
The prime minister also announced formation of a Supreme Court commission to investigate the allegations of rigging in last year's polls.
Sharif requested the Chief Justice of Pakistan to form a three-member bench of judges for this purpose.
"The government will not allow anyone to derail the democratically elected set-up," Sharif said in his address.
Sharif rejected the demand for his ouster and said new elections will be held in 2018.
"I again invite Imran Khan for dialogue. I am an elected person and will listen to the demands of the opponents," he said, adding that he would not surrender to any illegal demands.
The premier also accused some elements of affecting his efforts to revive the economy, resolve the worst energy crisis and deal with terrorism.