David Quinn wanted his team to get better at the boring.

That plan got a little hectic late, but the Rangers delivered a win nonetheless, 4-1 over the Kings on Sunday night at the Garden.

Igor Shesterkin made 41 saves, continuing to look more like a No. 1 goalie as the 24-year-old Russian won for the fifth time in six starts since coming up from AHL Hartford in January.

The Rangers (27-23-4) got an early goal from Greg McKegg, but it was Kaapo Kakko’s goal midway through the third period that proved to be the winner. Filip Chytil set up Kakko’s eighth goal of the year with a slick backhanded pass from the corner, setting up Kakko for the one-timer out in front.

The Kings (19-33-5) robbed Shesterkin of his first career shutout less than two minutes later. The rookie was caught in a tough position after going post to post tracking a pass, which allowed Trevor Moore to have plenty of net to work with when he sent one through to make it 2-1 at 10:47 of the third period.

But Shesterkin buckled down the rest of the way, and Artemi Panarin and Tony DeAngelo (empty-netter) added late insurance goals, as the Rangers tried to play a simpler game in front of him. They were coming off a 3-2 loss on Friday in which the Sabres forced traffic in the neutral zone and waited for the Rangers to make mistakes. Quinn wanted to avoid a repeat Sunday against the Kings.

“Well, we like to keep things interesting,” Quinn said before the game. “We’re getting better at it, but we have a hard time playing simple hockey from time to time. We get a little bit frustrated when simple is the right way to play. I think we’re getting better at it, but there’s another level we need to get to if we’re going to have an opportunity to win hockey games more consistently.”

The Kings entered Sunday with the second-fewest points in the NHL and on the second half of a back-to-back after falling to the Devils on Saturday night in Newark. It set up a perfect opportunity for the Rangers to bounce back from their loss Friday and regain some momentum before heading west for a three-game road trip that begins Tuesday in Winnipeg.

In their roller-coaster season — which has seen them win three straight games just once — the Rangers have been solid at keeping the downward turns brief. In their last 22 games coming off a loss before Sunday, the Rangers were 16-6-0.

Sunday, they were able to do so by handling the Kings’ structure in the neutral zone.

“We do it for a stretch, but it’s like we get bored doing the same thing over and over again and we think we have to try something else,” Quinn said. “In this game, that’s just not the way it works. You’ve got to be patient, you’ve got to respect your opponent, understand they’ve got good players too and they play a certain structure and system that allows them to have success and you don’t want to play into their hands.”

The Rangers struck first just 2:23 into the first period, courtesy of the fourth line and a fortuitous bounce. Kings goaltender Jonathan Quick had gone behind his net to retrieve a puck but it evaded his reach and caromed out front. Brett Howden got his stick on it and passed it over to the slot, where a crashing McKegg had a mostly open net to work with and fired a shot home for the 1-0 lead.