The deal with Marte is worth $31 million, a source close to the negotiations told ESPNdeportes.com's Enrique Rojas. Financial terms were not released by the team.
"Today is a great day for Starling Marte and the Pittsburgh Pirates organization," general manager Neal Huntington said. "We are honored to make a commitment to such a quality young man and exciting young player and we are humbled that Starling has made a significant commitment to the Pirates."
Marte receives a $2 million signing bonus from the Pirates, who are coming off their first postseason appearance since 1991. He gets salaries of $500,000 this season, $1 million next year, $3 million in 2016, $5 million in 2017, $7.5 million in 2018 and $10 million in 2019.
Pittsburgh has an $11.5 million option for 2020 with a $2 million buyout. If that option is exercised, the Pirates have a $12.5 million option for 2021 with a $1 million buyout.
"There are a lot of reasons,'' Marte said through interpreter Peter Greenberg, his agent. "I didn't feel I needed to wait because I like where I am. I have confidence in the organization and I feel comfortable."
If Marte finishes among the top five in MVP in any of the next six seasons, the option prices would increase by $500,000 each. If he finishes among the top five in 2020, the option for the next year would go up by $500,000. The option prices can increase by a maximum of $1 million each.
The deal replaces a one-year contract agreed to earlier this month that would have paid him $516,000 while in the major leagues and $300,000 while in the minors. He would have been eligible for arbitration after the 2015 season and for free agency after the 2018 World Series.
The Pirates had announced plans to extend Marte's contract at the beginning of spring training, but the player rejected their first two offers.
Marte, 25, hit .280 with 26 doubles, 10 triples, 12 home runs and 41 stolen bases in 135 games in 2013, his first full season as a big leaguer. He would not have entered free agency until after the 2018 season.
The native of the Dominican Republic is having a strong spring, hitting .356 (16-for-45) in Grapefruit League play.
Information from the Associated Press was used in this report.