The unnamed spy, who was the BND's station chief in Riga, had become romantically involved with a Latvian woman - despite warnings about fraternizing with locals.
Instead of informing superiors, he got Latvia's intelligence agency to run checks on his girlfriend. However AP did not report which agency investigated her.
The spy informed the BND only after she had moved in with him, after which he was recalled.
The spy started working in Rīga in 2006 and his affair started a year later. He was recalled in 2008, reported Süddeutsche Zeitung.
German news agency dpa reported the man went on sick leave and lost his job, after which he sought €400,000 ($421,920) in lost earnings.
A Munich regional court ruled against the claim Thursday and ordered him to pay legal costs.
The court reportedly considered that BND had taken into account that the romantic entanglement may have been a trap posing risk to the agency. The agency considered that the situation in the Baltics is more complex than in "the old Germany's NATO and EU partner countries" as the Baltics had been incorporated into the USSR for a longer time, reported Süddeutsche Zeitung.