Mika Zibanejad had a goal and two assists for the Rangers, who improved to 14-4-2 on home ice.
Despite being outshot 42-24 by the Kraken, the Rangers won for the 10th time in 15 games.
“Just getting the puck on net and good things happen,″ Miller said. ”Finding a way to get two points is the biggest thing ... We didn’t play our best game. It wasn’t our prettiest win but we got the job done.”
Yanni Gourde tied the game with a power-play goal for Seattle with 1:08 left. The Kraken had pulled goaltender Philip Grubauer pulled for an extra skater.
"It was fortunate to find the back of the net," Gourde said of his 10th goal this season.
But Miller put New York back in front when he rifled the puck past Grubauer for this third goal of the season, sending the Madison Square Garden crowd into a frenzy.
The Rangers had dropped two straight, falling 3-2 to Minnesota on Friday following a 5-3 defeat at Columbus on Thursday. The Rangers squandered 2-0 leads in both defeats. They saw a similar two-goal lead dissipate against the expansion Kraken on Sunday.
Rangers coach Gerard Gallant was unhappy with his team's performance against Seattle, which has just five wins in 19 road games.
“Today was disappointing to watch after two losses," Gallant said. “I expect a lot more from my group ... We didn’t play hard enough.”
Shesterkin, 21-5-2 this season, won for the eighth time in his last nine starts. In his last 16 starts, the Russian netminder has allowed two or fewer goals 11 times. Shesterkin downplayed the shots disparity against the hard-working Kraken.
“Honestly, I don't think that shot ratio makes that much of a difference," he said through a translator. ”There are a lot of teams that go out shooting from any position they can. They're not really that dangerous."
Zibanejad opened the scoring with his 17th goal on the power play at 11:46 of the first, one-timing a cross-ice pass from Artemi Panarin past Grubauer.
Zibanejad is on a scoring surge with 12 goals and 14 assists in his last 18 games.
Panarin, who leads the Rangers with 49 points, has points in seven out of his last eight games, with two goals and 11 assists.
Defenseman Jacob Trouba also assisted on Zibanejad’s 10th power-play goal of the season.
Alexis Lafreniere put the Rangers ahead 2-0 with his ninth goal of the season at 4:23 of the second.
Kraken forward Jared McCann narrowed the deficit with his team-best 18th goal, beating Shesterkin at 7:17 of the second.
McCann scored for his fourth straight game and leads the expansion Kraken with 28 points overall. He also assisted on Gourde's tying goal along with Kraken captain Mark Giordano.
"I thought we played a really game throughout," Giordano said. “Tough way to lose but a lot of good things came out of that game for sure.”
Shesterkin made his best save of the third when he denied Marcus Johansson on a Kraken power play early in the period.
Grubauer, who made 21 saves, had stopped Miller on a breakaway late in the third to keep it a one-goal game at the time.
But Miller’s low shot in the waning seconds -- after Zibanejad won the faceoff and passed the puck back to the 22-year-old defenseman — won it.
“We lost the faceoff," Kraken coach Dave Hakstol said in reference to the game-deciding sequence. ”That doesn't take away from how well our team played and how hard our team worked ... This group is growing together."
It was the first visit to Madison Square Garden for the Kraken, who had won two of three.
“Honestly the game was right there. We battled," said Gourde, a two-time Stanley Cup winner with the Tampa Bay Lightning before he was selected by the Kraken in the expansion draft. “ ”Unfortunately we weren't able to come out with any points. We had the right mentality.”
After beating the Kraken 3-1 in Seattle on Oct. 31, the Rangers had their only three-game losing streak of the season – with overtime defeats at Vancouver and Edmonton before a 6-0 defeat at Calgary on Nov. 6.
The Kraken fell to 5-12-2 on the road.
EXPANSION TEAM DEBUTS
Seattle became the 31st different franchise to play against the Rangers at Madison Square Garden. ... Only the Winnipeg Jets (now the Arizona Coyotes) in 1979, the Tampa Bay Lightning (1992) and Mighty Ducks of Anaheim (1993) won their first road games against the Rangers as expansion teams.
STRONG AT HOME
The Rangers have won six out of seven games at home and have earned a point in 16 of their 20 home games this season. New York is 6-1-1 in its last eight home games.
Rangers: Host Florida Panthers on Tuesday before a two-week schedule break.
Kraken: Visit the Boston Bruins on Tuesday.