Terms were not disclosed, but ESPN's Pierre LeBrun reports it's worth $2.3 million per season.
Scrivens was traded from the Toronto Maple Leafs to the Los Angeles Kings in the offseason in the Jonathan Bernier trade. The Oilers acquired him in mid-January for a third-round pick in the 2014 NHL Draft.
"It's a great opportunity. Now the real work begins," said Scrivens, an Alberta native. "It's great to be here in Edmonton playing at home."
Scrivens is 10-9-4 this season in 26 games for the Kings and Oilers. He leads the NHL with a .934 save percentage and is third with a 2.02 goals-against average and four shutouts.
"I'm comfortable here. I made a decision that's best for me career-wise and family-wise," he said. "I'm extremely excited."
In his third start for the Oilers, Scrivens set an NHL record for saves in a shutout with 59 against the San Jose Sharks.
"He's done a great job," captain Andrew Ference said. "It's good for him and good for us."
Scrivens, 27, has a career record of 21-23-6 with a 2.49 GAA, .921 save percentage and six shutouts.