Black Caps captain Tom Latham confirmed the change following Williamson's sudden retirement from international cricket on Friday, shortly after New Zealand lost the series opener at Lord's.
Nicholls, 34, made the last of his 58 Test appearances against Zimbabwe 11 months ago and has been chosen ahead of Will Young, who has rejoined the squad as cover.
Latham said: "It's a really exciting opportunity for him to come back into the side in a role, at three, that he's been doing for Canterbury at home.
"I think the good thing with Henry is he's always been able to adapt to situations. He's pretty much batted from the top to the middle throughout his international career, and he'll do whatever's required for the team."
On Williamson's shock retirement, Latham said: "For him to acknowledge that he's not quite right, or that he can't necessarily give 100 per cent, is testament to the player that he is, but also the person that he is as well.
"We're obviously gutted not to have him, but we also acknowledge what he's done for this group over a long period of time.
Latham confirmed that opener Devon Conway was "good to go" after jetting home between Tests to attend the birth of his second child.
Matt Henry, who was reduced to a peripheral role at Lord's due to back spasms, joined his team-mates at Tuesday's pre-match net session in a bid to prove his fitness for what is a must-win Test following a 115-run defeat at the home of cricket.
England will be led, for the 65th time, by Joe Root who has returned to the role after Ben Stokes was dropped in the wake of his breaking a team curfew following the first Test victory.
"I never thought I'd be sat here talking to you guys as England captain again. Zero chance…0.1 per cent," he said.
"The only thinking that came to my mind is what is the best thing for this team, is it going to have a big effect on me and my personal life and which outweighed the other.
"It felt like it was the right thing to take this on, so I tried to make it as simple as that. I think I am in a very different place to when I finished.
"To be captaining this group of players is a really exciting opportunity. It's a game-by-game basis, I think. Let's not look beyond this week."
The third Test at Trent Bridge begins just three days after the scheduled finish at The Oval. After that, there is a seven-week gap before the next series against Pakistan.