The 22-year-old has also played for Bastia in the 2011/12 season, when he scored eight times in 30 games, and he appeared 34 times for Rennes last term.
"I am very happy to be here. I want to bounce back here with (manager) Christian Gourcuff," Diallo told Lorient's website.
"I chose Lorient since it is a very good club that plays very good football and that suits me.
"I hope to repeat a season like I did at Bastia. I'm here to play and grow."
Lorient manager Christian Gourcuff added: "We are convinced that this is a great player and I hope he will find a favourable environment here to flourish, and bring us all his technical qualities."