The 31-year-old joined Lokomotiv in August 2013 but a year later he fell out of favour with coach Leonid Kuchuk. Diarra refused to train with the team and was subsequently sacked.
Diarra was unable to join another club for nearly a year due to his dispute with Lokomotiv but ended up signing for Marseille last July.
But now the Court of Arbitration for Sport has ruled that Diarra must pay €10m to Lokomotiv, along with an additional €110,000 to the court, for his conduct in Russia.
“I want to thank all the people that have backed me during this time,” the midfielder said on Twitter.
“I wouldn’t wish that to any footballer. I take full responsibility of what I did in the past. It’s a closed chapter and I am now only focused on France and the Euro that will be organised in my country.”
After an impressive season in Ligue 1, Diarra is set to feature in France's Euro 2016 campaign which begins against Romania on June 10.