Alexis Lafreniere
scored from the right circle to make it 3-1 at 1:15 of the third period.
Oshie completed the hat trick with an empty-net goal at 18:20 to make it 4-1.
Barron scored at 18:44 for the 4-2 final.
"I saw he got emotional there at the end, which was understandable," Capitals center Nicklas Backstrom said of Oshie. "I felt like he needed a hug. I told him like, 'You are the strongest person I know.'
"First of all, it's impressive that he actually played today and how he led the way. It's got to be so tough. I can only imagine. We are a family. We are in this together. His loss is everyone's loss. We feel for him."
The teams combined for 72 penalty minutes in the first 4:14 of the game. Each team had six fighting majors, including three apiece directly after the opening face-off and one for Capitals forward Tom Wilson at 50 seconds.
Wilson was challenged by and fought Rangers defenseman Brendan Smith.
"I had no beef with anyone else on their team," Smith said. "It had to be on my shoulders, and I thought I took it."
Wilson was fined $5,000 by the NHL Department of Player Safety for roughing New York forward Pavel Buchnevich on Monday. Rangers forward Artemi Panarin is out for the season after he was injured during that sequence of events.
"When your star player gets tossed around like that, I mean, it doesn't matter what type of team you have, I think the response was appropriate," Rangers center Ryan Strome said. "Proud of our guys. I think it says a lot about us."
Wilson also received a 10-minute misconduct at 15:56 of the first Wednesday. He did not return because of an upper-body injury. Laviolette said Wilson should be fine.
Buchnevich was assessed a five-minute major for cross-checking and a game misconduct at 4:39 of the second period.
The teams combined for 27 penalties totaling 141 minutes.
"This is the game that was dealt to us," Laviolette said. "I thought our guys responded well. We were disciplined. There's things that you have to do out there and I thought we did it, we kept our cool, won the game."
NOTES: Oshie had a game-high seven shots on goal and won eight of 10 face-offs. … The Rangers finished 14-11-3 at home. They have had a .500 or better points percentage at home for 16 straight seasons, tied for the longest streak in their history (1926-42). … The Capitals played their second straight game without center Evgeny Kuznetsov, who was scratched Monday because of team disciplinary reasons and was placed on the NHL COVID-19 protocol list Tuesday. … The Capitals played with 17 skaters. Forward Daniel Sprong was a late scratch because of a non-COVID related illness.