Azim Aghajani appeared in court in Abuja, but did not enter a plea.
Court documents reportedly identified him as a Tehran businessman, and also a member of Iran's Revolutionary Guards.
Three Nigerians have also been charged in connection with the shipment, which included rockets and grenades hidden between building materials.
The court said Mr Aghajani had been charged with attempting to import prohibited arms into Nigeria and conspiring to send the illegal shipment to Gambia.
The Iranian said he needed his embassy to represent him before he could present his plea.
Two of the three Nigerian defendants were only charged with conspiring to re-export the shipment to Gambia.
End Quote Matthew Idakwo ProsecutorThis is a matter of great national importance, and if I may add, it has international implications”
All four men are reported to be in custody in the Nigerian capital."This is a matter of great national importance, and if I may add, it has international implications," said prosecutor Matthew Idakwo. "These arms were imported from Iran to our country. It is of great interest to the world."
The BBC's Fidelis Mbah in Port Harcourt, who has been following the case, says Mr Aghajani's court appearance came as a surprise.
People were not aware that Mr Aghajani was going to be charged in court, as the Iranian government had been reaching out to their Nigerian counterparts to find ways of resolving this issue, our correspondent says.
The arms were discovered at Apapa seaport in Lagos in October. They were hidden in 13 containers shipped from Iran, which were labelled as building supplies.
Mr Aghajani is believed to be the man who was questioned inside the Iranian embassy in Nigeria several weeks ago in relation to the shipment.
There were reports that the Nigerian authorities wanted to question a second Iranian national, but that he had since left the country.
Iran has said the weapons were the subject of a "misunderstanding" that has now been cleared up.
Nigeria reported the seizure of the shipment to the UN Security Council for an apparent breach of the sanctions against Iran.
Another illegal shipment of weapons was discovered in Lagos on Wednesday, increasing fears among some Nigerians of possible violence ahead of next year's elections.