The suspect, identified as Carsten L, “transmitted information that he had obtained in the course of his professional activities to Russian intelligence services", federal prosecutors said.
He was arrested in Berlin, with authorities searching his workplace, home and a second address.
The Federal Intelligence Service (BND) called in prosecutors after its own internal investigation uncovered possible treason, spy chief Bruno Kahl said.
“The accused is suspected of state treason,” the federal prosecutors' office said.
“In 2022, he shared information that he came by in the course of his work with a Russian intelligence agency. The content is considered a state secret.
“Investigations were conducted in close co-operation with the BND."
The suspect, a German citizen, has been remanded in custody after appearing before a judge.
The case comes at a time of high tension between Berlin and Moscow after Russia's invasion of Ukraine in February.
Mr Kahl said the case against the agent would have to conducted discreetly.
“With Russia, we are dealing with an actor whose unscrupulousness and willingness to use violence have to be reckoned with,” he said.
“Every detail of this operation that becomes public means an advantage for this adversary in its intention to harm Germany.”
Germany has faced several spying cases with links to Russia in recent years, as have other European countries.
Last month a German man was given a suspended sentence for passing information to Russian intelligence services while working as a reserve officer for the German army.
Also this year, Sweden has charged two brothers with spying for Russia, the Dutch arrested an alleged spy trying to get access to the International Criminal Court, and France expelled six people believed to have been undercover spies.