The 19 year-old, who joined the club's youth system six years ago, has been ever-present in the team in Ligue 1 since October in an impressive breakthrough campaign.
Lopez's performances have reportedly attracted the interest of Barcelona, rumoured to have been preparing an offer for the player at the end of the season.
But the France Under-20 international has committed his future to Marseille by signing a contract that will run until June 2021 at the Stade Velodrome.
Marseille president Jacques-Henri Eyraud believes Lopez's renewal will show the young talent at Marseille the value of spurning potential interest from elsewhere.
"Maxime Lopez's extension is a strong symbol for all of us," he said. "He is a young, talented player who is very appreciated by the fans, and to whom we want to give a chance to develop into a man at the foundation of our sporting project.
"Beyond that, the message we want to send to the young Marseille players is that everything is possible with OM as long as the following conditions are met: exceptional discipline and work ethic, personal talent, and a mentality to put the collective interest ahead of individual interest."