The 39-year-old who worked in Buxtehude near Hamburg took cash from customers' accounts 156 times and pocketed money customers gave to him to invest, Stade District Court heard on Monday. In some instances he faked their signatures, prosecutors said.
The sums that disappeared between 2007 and 2010 ranged from several hundred to several hundred thousand euros.
The man allegedly blew much of the missing €8.4 million on online gambling and at a Hamburg casino.
He has been charged with fraud, breach of trust and falsification of documents. If found guilty he could be jailed for several years.
Prosecutors said the man, who has not been named, had already paid back €4.5 million.
His former colleagues will be called as witnesses in the trial to explain how he managed to take such large sums of money for years without being detected.
But his defence lawyers are set to argue that their client was a gambling addict, reducing his level of criminal responsibility.
The trial is set to continue on August 21st with a verdict expected in mid-September.