Salehi said at a news conference with his visiting Syrian counterpart, Walid Muallem.
Assad has steadfastly rejected calls from Western leaders, Arab countries, Turkey and the Syrian opposition to relinquish power and has kept quiet on whether he would contest the next presidential election.
The Syrian opposition refuses to have any dialogue with the regime until Assad leaves office.
On January 15, Syria's Deputy Foreign Minister Faisal Muqdad told the BBC that Assad should be allowed to stand in the 2014 election like any other candidate and it was up to the Syrians themselves to decide their future leadership.
"We are opening the way for democracy, or deeper democracy. In a democracy you don't tell somebody not to run," Muqdad said in an interview.
"The president now and many other candidates who may run will go to the people, put their programmes and be elected by the people."
On Saturday, Salehi also said that "the official position of Iran is that... Assad will remain the legitimate president until the next... election" in 2014.
Muallem arrived on Saturday in Tehran for talks aimed at ending the nearly two-year conflict in Syria that the United Nations says has killed at least 70,000 people and is tearing the country apart.
His visit comes after a week of intense international diplomacy aimed at ending the bloodshed.
Salehi threw Tehran's weight behind Damascus's call this week for dialogue with the armed opposition, calling the initiative a "positive step," but reiterated that Assad's regime has "no choice" but to keep fighting rebels.
"We believe that the crisis has no military solution and only a Syrian political one," he said.
"Iran firstly wants a stop to the bloodshed but the Syrian government has no choice but to fight against the terrorists and we cannot ask the Syrian government not to do so and leave them alone," Salehi added.
Muallem, meanwhile, condemned US Secretary of State John Kerry's Thursday announcement that Washington would provide $60 million in "non-lethal" assistance to Syria's political opposition.
"When the US (says it has) allocated $60 million to the opposition and this opposition is killing people, I don't understand this initiative... are there any weapons that do not kill people? Who are you kidding?" Muallem asked.
He repeated calls for pressure to be exerted on Turkey and Qatar, among the main supporters of the rebels alongside Western countries.
While in Tehran, Muallem is also due to meet Saeed Jalili, secretary of the Supreme National Security Council, Mehr news agency reported.