The 22-year-old, who has just won his first call-up to the France national team, will join Steven Gerrard’s side following the expiry of his contract with the French club at the end of June.
His signing comes after Villa made Philippe Coutinho’s loan from Barcelona permanent earlier this month.
Kamara made 170 appearances for Marseille after coming through the club’s youth ranks, scoring four goals.
Marseille finished as runners-up in Ligue 1 this season and reached the Europa Conference League semi-finals.
“I am delighted that we have been able to attract one of the most promising young talents in European football,” said Gerrard, whose side finished 14th in the Premier League.
“We have a very clear plan to make our team stronger and Bouba is an important part of that.”