As first reported by ESPNdeportes.com's Enrique Rojas, the contract, which was agreed to 10 days ago, contains guaranteed money at $60 million over the duration of the deal. It includes $1 million in a buyout, a source told ESPNChicago.com's Bruce Levine.
The contract option calls for an eighth season at $16 million, a source told Levine. Castro will receive a $6 million signing bonus, which includes $3 million up front and $1 million payments for the next three years. If he wins the MVP or finishes in the top five two years in a row, $2 million is added to the last year of his deal and the option, according to a source.
The contract covers Castro's four arbitration seasons as well as his first three free-agent seasons.
"The way it was looking, Starlin would be a free agent far too early," Cubs general manager Jed Hoyer said on Tuesday. "He's a big part of our future and we had four years of control of him after this year. By doing this deal we now have eight.
"... He's one of the players we're building around and we're excited to have him as a Cub for a long time and he's a big part of our future. We're building a young core and Starlin's right in the middle of that. We're really excited about it. This is about him. It's certainly not about me. But this is a very good day for the Cubs."
For Castro, who comes from humble roots, the deal provides financial security.
"It's big," Castro said. "It's big especially for my family. We come from very poor people and now my family is going to be better. Their lives changing and that's really neat."
With a long-term deal secured, Castro hopes to become a leader in the Cubs' clubhouse.
"I think I'm ready," Castro said. "I think I'm ready to take on this responsibility here with this team and help the other guys who are coming up like (Alfonso Soriano) helped me. I think I'm ready for that in the field and off the field."
While Castro's raw talent has always been evident, things have not always gone smoothly for a player who skirted with trouble off the field and suffered well-publicized mental lapses on it. He was accused of sexual assault following the 2011 season, though Cook County prosecutors declined to press charges, citing insufficient evidence.
Castro's on-field focus has also been questioned, most notably during a nationally-televised game last season when cameras captured him with his back to the plate as a pitch was being delivered.
Despite the occasional bouts with immaturity, the Cubs feel Castro is going to be a foundation player for a club just beginning its rebuilding process under a new front office regime headed by vice president of baseball operations Theo Epstein and Hoyer.
"It's been fun getting to know Starlin as a person, but also watching him play every day," Hoyer said. "Shortstop is a really hard position to fill in today's game, especially with someone who can provide it with offense.
"There is no question in my mind that he can play shortstop in the big leagues on a championship team."
The 22-year-old two-time All-Star, a career .296 hitter, is batting .276 with 12 home runs and 63 RBIs this season. He is on pace to reach 500 career hits before the end of the season and would become the 28th player in history to reach that mark before age 23. Castro was the youngest player to lead the NL in hits (207) at age 21 in 2011.
"It'll be interesting to see if there is any change now that this thing is behind him and he'll be here for a long time," said Cubs manager Dale Sveum. "When you get that first contract, you can relax and realize that there really is only one thing to play for and that's winning the World Series."
Information from The Associated Press was used in this report.