The pair, a 59-year-old German and a 41-year-old foreign national, were arrested on Thursday in the western city of Frankfurt in a series of police raids in several regions.
The prosecutor's office did not name the foreign intelligence service and declined to confirm if it was Iran's, as reported by public television ARD.
The pair were placed in detention overnight on Saturday after being charged with intending to supply components for "launcher technology" and "conventional arms for military forces", the prosecutor's office said.
The items included missile-guidance systems, military communications and night-vision equipment, and machines used to manufacture parts for the European Space Agency's (ESA) Ariane 4 rocket launcher.
Federal prosecutors allege border police and customs officers seized at least 20 shipments of military transmitting equipment which the men allegedly tried to export.