The deal is worth a total of $38.5 million with an annual salary-cap charge of $5.5 million, according to a league source.
Leddy was acquired by Islanders general manager Garth Snow in an October trade that sent prospects T.J. Brennan and Ville Pokka along with the rights of restricted free-agent goalie Anders Nilsson to the Blackhawks in a swap made to help get Chicago under the salary cap.
"Nick has proven to be an elite defenseman in this league at a young age," Snow said in a statement. "He's the type of player on the ice, in the locker room and in the community that we're thrilled to add as a cornerstone of our defensive core."
Leddy, along with the addition of Johnny Boychuk, is credited with helping shore up an Islanders defense that struggled last season.
The Minnesota native has seen his ice time jump to 20:12 per game under Islanders coach Jack Capuano after averaging 16:22 last season with the Blackhawks. In 61 games, he has 25 points and a career-high eight goals in helping the Islanders climb to the top of the Metropolitan Division.
"We have something special in this locker room and I'm excited to be a part of it for seven more years," Leddy said in a statement. "From the start of my time here, the Islanders have been a first-class organization. I'm honored by their commitment to me and look forward to challenging for the Stanley Cup for years to come."
The annual salary of the Leddy contract starts at $4 million next season and grows in increments of $500,000 until reaching $7 million in the final year. It doesn't include a no-trade clause. He would have been a restricted free agent this summer.
A veteran of 319 games, Leddy has 118 points in his career and won a Stanley Cup with the Blackhawks in 2013.