Evander Kane and Nicholas Baptiste each had a goal and an assist in Buffalo's third straight win, matching a season best accomplished three times. Ryan O'Reilly also scored for the Sabres (26-23-10), who have three more wins than losses for the first time since closing the 2011-12 season 39-32-11.
St. Louis dropped to 7-2 since Mike Yeo replaced Ken Hitchcock as coach. The Blues also had won five consecutive road games.
The Sabres beat the Blues for the first time since Dec. 27, 2009, stopping an 0-8-1 drought. It was Buffalo's third win in 24 games against St. Louis dating to the start of the 1998-99 season.
Buffalo broke it open by scoring twice in the second period for a 3-1 lead.
Kane scored the go-ahead goal at 11:58 when he parked in front and deflected Zach Bogosian's shot from just inside the blue line. It was Kane's 20th of the season.
O'Reilly scored with 32 seconds left with Buffalo enjoying a two-man advantage. Playing give-and-go with Rasmus Ristolainen, O'Reilly worked his way into the right circle where he spun and beat Allen inside the far post.
Lehner was sharp after being beaten by Tarasenko on the short right side just 1:31 into the game, when the Blues capitalized on a delayed penalty.
Lehner's best save came 20 seconds into the second when he kicked out his pad to stop Jori Lehtera.
The Sabres scored three straight times, beginning with Baptiste being set up by Jack Eichel and slipping a shot through Allen's legs midway through the first period.
It was Baptiste's third goal of the season and came after he was recalled from the minors earlier in the day to replace Sam Reinhart, who was sidelined by an illness.
Upshall had a short-handed goal at 15:03 of the third, but the Sabres held on from there.
The start of the game was delayed by about five minutes because of poor ice conditions. Referee Dean Morton announced just as players lined up for the opening faceoff that the rink had to be re-flooded due to the integrity of the ice.
Ice conditions have been an issue around the league this season. The NHL Players' Association has asked players to rate the ice conditions following games after a series of concerns have been raised.
The game was played after crews worked overnight to remove the flooring from the ice surface after Buffalo hosted a National Lacrosse League game on Friday night.
NOTES: Blues C Kyle Brodziak returned after missing 10 games with an injury to his right foot. ... Blues F Paul Stastny (lower body) missed fourth straight game. He has a good chance of returning on Monday against Florida, Yeo said. ... Sabres D Cody Franson returned after missing four games with a foot injury. In recalling Baptiste, Buffalo placed D Taylor Fedun on waivers.
St. Louis: Hosts Florida on Monday.
Buffalo: Hosts Chicago on Sunday.