Olofsson put Buffalo in front 3-2 at 12:08 of the third period. Rasmus Dahlin knocked down a clearing attempt near the blue line and passed to Olofsson, who scored from all alone in the right circle.
"I was fake pressuring the forward, he got kind of stressed, and I know he kind of wanted to get the puck out," Dahlin said. "That's a play I used to do. Sometimes it works, sometimes it doesn't, and today it worked. It was good that I batted it down and gave him the puck."
Dylan Cozens scored a power-play goal on a rebound near the left post at 15:11 for the 4-2 final.
Jesper Fast gave Carolina a 1-0 lead at 14:58 of the first period, taking a backhand pass from Niederreiter in the slot, deking Anderson and lifting a backhand top shelf.
Jeff Skinner tied it 1-1 at 1:21 of the second period. Tage Thompson intercepted Brady Skjei's pass attempt in the Sabres' zone to create a 2-on-1. He then faked a shot and slid a pass through Brett Pesce's legs to Skinner, who shot into an open net.
"That's the vision and talent of Tage," Buffalo coach Don Granato said. "He's a 30-goal scorer, he's staring right at the net, and he still has the presence to manipulate and make that play."
Casey Mittelstadt put Buffalo ahead 2-1 at 5:59 from the right circle.
"It's pretty obvious, pretty self-evident, we played just a terrible second period," Hurricanes coach Rod Brind'Amour said. "Then you leave it up to chance. We played a good third. We came out hard and did everything. Had a great third, but it's too late. Leave it up to chance. We got what we deserved there."