Miller made 43 saves in regulation and overtime and turned aside three attempts in the shootout, and Ales Kotalik scored the lone goal in the tiebreaker to send New York to only its second loss in 10 shootouts this season.
Valiquette finished with 32 saves in just his eighth start for the Rangers, who began a five-game trip. He was particularly sharp in the third period when the Sabres peppered him with 16 shots.
"It was fun. I can't imagine Steve's feeling as high about it, but he should be happy with his game," Miller said. "He played really well. These nights don't come around too often where you go head-to-head with the other guy."
Miller, making his sixth consecutive start, was especially solid in the second period, keeping the Sabres in the game despite an 11-1 shot disadvantage in the first 14 minutes of the period.
"Both were good," said Rangers captain Chris Drury, a former Buffalo star. "Ryan's one of the best in the league. You could tell right from the start he was locked in pretty good. It was a heck of a game by him."
Kotalik's wrister blew past Valiquette in the first round of the shootout. Miller ended the game by stopping Drury's attempt in the third round.
Valiquette was giving starter Henrik Lundqvist a break after Lundqvist allowed five goals on 24 shots Wednesday night in a loss to Montreal.
"If I go a week or three between games, I know I'm going to be ready to play," Valiquette said. "We can't control the outcome of the game, but our performance is very much within it."
Derek Roy scored in regulation for Buffalo. The Sabres (21-15-5) have won four in a row for the first time since starting the season 4-0.
"You've got to give (the Rangers) credit," Sabres coach Lindy Ruff said. "They were beating us to the punch almost every direction. We finally turned the table in the third period."
Paul Mara scored for New York (24-15-4), which lost its second straight and third in the last four games.
The loss prevented the Rangers from climbing into a tie for first place in the Atlantic Division with idle Philadelphia.
The Sabres were bolstered by the return of center Tim Connolly, who missed nearly two months because of a broken rib. Before that, he missed the first 10 games of the season with a broken vertebra.
Rangers defenseman Michal Rozsival, meanwhile, left with 16 minutes remaining in the third period after getting leveled by Paul Gaustad before falling face first into the edge of the boards where the door to the Sabres' bench was open.
Rangers coach Tom Renney said Rozsival sustained an abrasion above his cheek, but won't know exactly how bad an injury his blueliner may have sustained until meeting with the team doctors.
"I chatted with him and he seemed fine," Renney said. "He was completely coherent and under control."
Mara gave the Rangers a 1-0 lead with 37 seconds left in the first period. His shot from the right point appeared to go off Roy before going past Miller.
Roy tied it with his 15th with 3:23 left in the second period, banging home a rebound through Valiquette's legs after the goalie stopped Drew Stafford's shot from the right circle.
"You can't expect to win them all," Rangers forward Markus Naslund said about his team's 8-2 shootout mark. "We've had a great record so far, and we're still confident that we can win the majority of them."
Notes: The Rangers had no penalties, while the Sabres were whistled for just two. ... Eight of Buffalo's next nine games will be on the road. ... Sabres D Toni Lydman returned after missing one game because of the flu. ... Mara has four goals this year, with two of them coming over the last three games. ... Roy extended his points streak to four games. ... Buffalo has won two of the past six games against New York.