The May 19 election will see incumbent moderate Hassan Rouhani face off against two highly-touted conservative rivals.
Speaking at a meeting of ambassadors from Muslim nations in Tehran, Khamenei encouraged candidates "not to look abroad (but) to pin hope on the capabilities of the nation for progress".
Under Rouhani, Iran in 2015 signed a landmark deal with world powers to lift economic sanctions on the Islamic republic in return for curbs on its nuclear programme.
A number of Western corporations have since announced deals with Iran.
Signup to our newsletter and follow us on Facebook and Twitter!
The nuclear accord alleviated some of the international isolation Iran experienced under Rouhani's predecessor, the hardline Mahmoud Ahmadinejad who was last week barred from competing in next month's election.
But disappointment with Rouhani's handling of the economy is palpable and analysts say his re-election bid will be far from straightforward.
Khamenei, who as supreme leader has the final say on matters of state, discouraged candidates on Tuesday from reaching out to other nations.
"They fight against the Islamic Republic of Iran... as (Islam) blocks their interests," he was quoted as saying.
With conservatives buoyant over the sluggish economy, hardline cleric Ebrahim Raisi, who is seen as a close Khamenei ally, is Rouhani's most likely challenger on May 19.
Another hopeful, Tehran mayor Mohammad Bagher Ghalibaf, has support from powerful backroom hardliners and presents himself as a pragmatic problem-solver.