Jacob Markstrom made 17 saves for his third shutout of the season and the eighth of his NHL career.
Johnny Gaudreau and Mark Giordano each had a goal and an assist, Sam Bennett had two assists, and Sean Monahan and Elias Lindholm scored for Calgary (17-21-3), which won for the second time in 10 games.
"We're not in a spot we want to be, but tonight's a start and it gives us a chance to build," Monahan said. "We needed to win a game. Now we have a chance to build on that. We have to get ready here for our next one."
Mike Smith made 27 saves for Edmonton (25-15-2), which had won two in a row and three of four.
The Oilers participated in the Colby Cave Celebration of Life earlier Saturday. Cave, who played 67 NHL games from 2018-2020, including 44 with Edmonton, died April 11, 2020, four days after he had surgery to remove a colloid cyst that was causing pressure on his brain. He was 25.
"I think we've definitely been on a ... I don't even think you can call it a run at this point," Oilers captain Connor McDavid said. "I think we've had a good stretch of games over an extended period of time. I think obviously you never like to lose the way you do tonight, especially against a team like Calgary, a team that we don't really like very much. It's obviously bitter, but it's some days it's a little bit more than hockey with everything that's going on."
The Flames scored four times in the second period to take a 4-0 lead.
Monahan one-timed a pass from Andrew Mangiapane to put Calgary up 1-0 at 3:12. It was Monahan's first goal in 13 games.
"You always want to start with a lead and play with a lead," Monahan said. "That's not always the case. I put a lot of pressure on myself to be a go-to guy and somebody who's going to obviously provide offense. When you're not doing that, it's frustrating. You have to stick with it and keep working at it."