Speaking as leaders and delegates of 50 countries gathered in Tehran, he also accused the US of "bullying" the world.
The crisis in Syria is on the agenda for the two-day summit, as are human rights and nuclear disarmament.
Egypt's President Mohammed Mursi is attending - the first visit to Iran by an Egyptian leader since 1979.
The Non-Aligned Movement (Nam) was established in 1961 by countries that wanted to counterbalance the dominance of the US and Soviet Union during the Cold War.
It meets once every three years but its relevance on the international stage has declined significantly since the end of the Cold War and the fall of the Soviet Union.
The Tehran summit caps a week of meetings and involves delegates and leaders from 50 of the 120 member countries - a meeting of non-aligned foreign ministers on Tuesday was dominated by criticism of sanctions against Iran and decision-making at the UN.
Ayatollah Khamenei told the delegates: "I insist that the Islamic Republic of Iran is never seeking nuclear weapons," calling them "a major and unforgivable sin".
But he said Iran would "never give up the right to peaceful nuclear energy".
The US and many of its allies suspect Iran's nuclear programme is aimed at developing a weapon, but Tehran insists it is strictly for civilian purposes.
He said sanctions imposed in Iran because of its nuclear programme "not only do not and will not paralyse us, but have made our steps steadier and elevated our resolve and boosted our confidence in our assessments".
The ayatollah also criticised the "illogical" structure of the United Nations Security Council, saying it enabled the US to impose its "bullying manner" on the world, Reuters reports.