The defenseman, who turned 25 on Feb. 4, would have been a restricted free agent July 1. He has 24 points (four goals, 20 assists) while averaging 22:46 ice time in 55 games this season and is second on the Oilers with 129 hits and 101 blocked shots.
"I didn't want to drag it into the summer," Nurse said. "I didn't want it to carry on any longer, just get it over with. I think it works out for both sides.
"We were trying to negotiate kind of around the five-year term. We ended up at two. For me, I love it here, I love the guys here. We have a great owner, great management, great coaching staff. It's a place I want to be in. Hoefully we can work on something 16 months for now, but it's good to get this one."
Nurse, the No. 7 pick in the 2013 NHL Draft, has 112 points (28 goals, 84 assists) in six seasons, all with Edmonton.
"On the ice, his game speaks for itself," Oilers center Connor McDavid said. "Off the ice, he brings a lot of personality, a lot of energy. He does a lot for the guys in the room. He's always had that kind of chrisma and that kind of leadership. He was a captain in junior and knows what it means to be a leader. He's a leader whether he likes it or not. He likes that role, does a great job in that role and all his teammates love him."
The Oilers (29-20-6) are second in the Pacific Division, one point behind the Vancouver Canucks, and play the Chicago Blackhawks at Rogers Place on Tuesday (9 p.m. ET; ESPN+, SNW, NBCSCH+, NHL.TV).