Sanson, 22, was in his fourth season at Montpellier but the Frenchman has made the switch after the clubs agreed a deal of €9million, plus €3m in bonuses.
Marseille president Jacques-Henri Eyraud was thrilled to welcome Sanson, a France youth international.
"I am very pleased that the first player who joined us during this transfer window is one of the most promising talents in French football," he said.
"We also want to rely on young players who will accompany our project until we reach our goals."
Sanson had contributed three goals and six assists in 20 league games for Montpellier this season.