Anderson will receive $850,000 in 2017, $1 million in 2018, $1.4 million in 2019, $4 million in 2020, $7.25 million in 2021 and $9.5 million in 2022.
The contract also contains team options for 2023 ($12.5 million) and 2024 ($14 million) with a $1 million buyout.
The value of the contract is the largest for a major leaguer with less than one year of service time, breaking the previous mark set by Tampa Bay Rays starter Chris Archer, who got $20 million guaranteed in 2014.
Prior to Tuesday's agreement, Anderson would have been a free agent after the 2022 season, so the contract gives the White Sox two more years of control. It also follows a pattern of the team agreeing to club-friendly deals with players before they hit free agency.
They did it with former ace Chris Sale and outfielder Adam Eaton, enhancing their trade value, as well as pitcher Jose Quintana. Sale and Eaton were traded in the offseason for prospects that include infielder Yoan Moncada and hard-throwing pitchers Michael Kopech, Lucas Giolito and Reynaldo Lopez.
Anderson, the No. 17 overall pick in the 2013 draft, had a solid rookie season for the White Sox in 2016, batting .283 with nine home runs and 30 RBIs in 99 games. He finished seventh in American League Rookie of the Year voting.
The White Sox have worked with Anderson on his selectivity, after he drew only 13 walks while striking out 117 times in 431 plate appearances last season.
Anderson, 23, has missed Cactus League play with Chicago since Friday for personal reasons.
Information from ESPN's Keith Law and ESPN Stats & Information contributed to this report.