He made the remarks in a post on social media platform X one day after Germany announced its decision to close all three Iranian consulates in the country, Xinhua news agency reported.
"The closure of Iran's consulates in Germany is a sanction against Iranians residing in that country, of whom most possess German citizenship as well," said Araghchi on Friday.
He added that the German government was sanctioning "tens of thousands of other Iranians holding a German passport in support of a terrorist who took 14 innocent lives and injured more than 200 others" in a bombing in Iran's southern city of Shiraz in 2008.
The three Iranian consulates affected by the closure decision are in Frankfurt, Hamburg, and Munich. The Iranian embassy in Berlin will remain operational.
Iran's judiciary executed Sharmahd on Monday for his involvement in several "terrorist" attacks against Iranian people.