City took the lead when Lee Tomlin's shot hit Wednesday keeper Joe Wildsmith before crossing the line.
Bobby Reid then quickly doubled the lead by firing into the top corner before Tomlin converted a spot-kick.
Jonathan Kodjia scored City's second penalty after the break before Richard O'Donnell's own goal made it 4-1.
O'Donnell was the second of the two keepers to have seen the ball deflect into his own net in a game that has greatly improved City's chances of another season in English football's second tier.
Tomlin, who had to go off at half-time with an injury, was awarded the hosts' opener by the referee despite Owls keeper Wildsmith having the final touch after the City striker's volley deflected off a Wednesday defender.
Reid's second for the Robins came soon after, when he latched onto Luke Freeman's cross after a quick free-kick.
Tomlin was then brought down in the area by Liam Palmer and he converted the penalty himself to make it 3-0 at the break.
Reid was instrumental in City's fourth, when he beat Wildsmith - a late replacement for the injured Kieren Westwood - to the ball and was brought down in the area. Kodjia duly dispatched the resultant spot-kick.
Wednesday netted just after the hour, when Wallace's free-kick struck a post and hit O'Donnell's fingertips on its way into the net.
The Owls remain sixth, five points clear of Cardiff, their nearest contenders for the final play-off position.
Bristol City manager Lee Johnson:
"The lads wanted Monday off, but I said no because it's important we realise the job is not done yet and avoid any complacency creeping in.
"It was a fantastic afternoon for us. Richard O'Donnell made a very important save early on, we got ourselves on the front foot and our game plan worked perfectly.
"Bobby Reid was superb. He has needed to find consistency and has done that in recent games. He scored a goal, won a penalty, and had a really positive effect.
"I rate Sheffield Wednesday highly. We had to be strong in all areas, so I think it was the best display since I took the job."
Sheffield Wednesday head coach Carlos Carvalhal:
"It was a day off for us in the Championship. It is a long competition and you get accidents along the way.
"We started strongly, moving the ball well and creating good chances. The players thought it was going to be easy and their heads went into the clouds.
"It was hard to understand the first half. After the second goal we lost control of the game and Bristol deserved to be three goals up
"The second half was different. Again they scored from their first attack, but we were more like ourselves. We should have had a penalty when Marco Matias was fouled and kept fighting to the end."
Bristol City moved 10 points clear of the Championship relegation zone as they comfortably saw off promotion-chasing Sheffield Wednesday.