Briton David Ballantyne Smith, 58, pleaded guilty to eight charges last year but returned to court for legal argument about his motivation.
Smith is alleged to have received money in exchange for information.
He claims he was not paid and was motivated by an employment grievance while suffering mental health issues.
Smith began working at the embassy in 2016. His behaviour changed after his wife moved back to her home country, Ukraine, in late 2018, the court heard.
Prosecutor Alison Morgan KC said Smith went from being “keen and polite” to expressing anti-UK and anti-German views.
Morgan also told the court Smith expressed views about the war in Ukraine, supported Russia and collected German uniforms from World War Two.
Smith began collecting secret information from the embassy, which he stored on a USB stick, from around 2018, the court heard.
Footage from the embassy and a draft letter to a Russian military attache, dated 14 May 2020, were found after an examination of his devices.
In the letter, he confirmed he worked at the embassy and wanted anonymity as he offered a book classified as “official sensitive”.
There were also “secret” classified emails and documents, pictures of staff security passes and personal information, as well as posters and whiteboards in the embassy.
An undercover operation was prompted by a letter Smith sent in November 2020 to a member of military staff at the Russian Embassy in Berlin, which suggested ongoing contact.
During the undercover operation, Smith was offered the chance to obtain “highly sensitive information” about someone called “Dmitry”. Smith was led to believe “Dmitry” was a Russian national helping the UK.
Smith was then approached by “Irina”, an undercover operative who posed as an agent of the Russian intelligence service.
The extent of his activities, spanning four years, was uncovered in August 2021 following his interaction with “Irina”. Some 800 euro (£700) of cash was found in his home in Potsdam, Germany.
On the day of his arrest, Smith had left work early complaining he was feeling ill and was met by German police at his home.
A request was made for his extradition to the UK in November 2021, following a probe by British counter-terrorism police. Smith arrived back to the UK in April 2022.
Smith faces a maximum of 14 years in prison. He will be sentenced on Friday.