The team did not announce the money, but multiple reports said the contract has an annual average value of $7 million.
Lee became the Islanders captain this past season after Tavares bolted for Toronto.
"Today is a wonderful day," Lee said on a conference call with reporters. "My wife and I, we couldn't be happier. This is the place we always wanted to be and saw ourselves. We couldn't be more thrilled than we are right now."
The Edina, Minnesota, native said he never had any doubts he would be staying, even while the team pursued free-agent forward Artemi Panarin, who reportedly took less money than the Islanders offered to sign with the crosstown-rival Rangers.
It turns out, that was part of the plan Lee and agent Neil Sheehy had all along with Islanders president and general manager Lou Lamoriello.
"Obviously it took a little bit of time, but that's just how these things work," Lee said. "There were some up and downs, but at the day I knew we'd figure this all out together. ... We just kept that communication going the whole time. In principal, Lou had and Neil had agreed on some things that allowed Lou to go after some other things out there and then things kind of fell into place."
Lee also said he didn't meet with any other teams.
"Neil fielded calls but his job for me was to continue just to work with Lou," Lee said. "That's where we kind of really were."
The 28-year-old had career highs with 40 goals and 62 points in 2017-18, but he made the adjustment to coach Barry Trotz's more defensive style last season and still had 28 goals and 51 points. More importantly, the Islanders returned to the playoffs, sweeping the Penguins in the first round before being swept by the Hurricanes in the second round.
Lee is coming off a four-year, $15 million contract with the Islanders. He has eclipsed 50 points the past three seasons and was due for a raise. He had said repeatedly, however, that he liked the idea of staying with the Isles.
Information from The Associated Press was used in this report.