Liam Palmer was the unfortunate man to miss after a stunning start to the shootout saw nine successive penalties scored, with the Premier League outfit edging out the second-tier side in the capital.
In regulation time, a fortunate bounce allowed Kevin Schade to give Brentford an early lead, and the Bees had many chances to extend their lead before the break in a game that appeared very comfortable for the home side.
However, Djeidi Gassama's superb strike just short of the hour stunned the Gtech and pulled the visitors level in West London with one of the few sightings of note they had on the night.
The away support were jubilant in the aftermath, and Danny Rohl's side troubled Mark Flekken a few times moments later, with Ike Ugbo and Palmer both testing the Brentford keeper.
Brentford soon regained the ascendancy, but found 19-year-old Pierce Charles tough to beat in the Owls' goal, with the young stopper coming out on top in numerous late attacks by the home side, as the game went to penalties.
Thomas Frank's side were perfect from the spot, scoring all five penalties, as Sheffield Wednesday's fifth man, Palmer, was denied by Flekken, handing Brentford a spot in the quarter-finals.
That means the Bees will play in the quarter-finals of the EFL Cup for just the third time in their history, knocking out the 1991 winners, who fought bravely and done the away supporters proud at the Gtech.
BRENTFORD VS. SHEFFIELD WEDNESDAY HIGHLIGHTS
Schade goal vs. Sheffield Wednesday (11th min, Brentford 1-0 Sheffield Wednesday)
Some neat build-up play sees Keane Lewis-Potter knock the ball in behind for the speedy Schade to chase, and even though Charles denies him at the first time of asking, the ball takes a very unfortunate ricochet off Gabriel Otegbayo and falls perfectly for the German to tap home.
Gassama goal vs. Brentford (58th min, Brentford 1-1 Sheffield Wednesday)
Out of nowhere Sheffield Wednesday are level! An error from Flekken is pounced upon by Gassama, who carries the ball into Brentford territory and lets fly from 25 yards out, beating the Dutchman down low to his right-hand post to equalise for the Championship outfit.
Flekken winning save vs. Sheffield Wednesday (90th min, Brentford 5-4 (pens) Sheffield Wednesday)
After nine straight penalties found the back of the net, Palmer was denied as Flekken sprung down to his right to keep out the Sheffield Wednesday substitute to send the home side through.
MAN OF THE MATCH - PIERCE CHARLES
While Brentford were very slick at times in attack and the visitors ultimately fell to defeat, teenage goalkeeper Charles had a night to remember, often on hand to thwart the hosts in what was just his sixth senior club appearance.
A fine save deserved more in the phase of play that saw Brenford take the lead, and the young Northern Ireland international was also on hand to deny Bryan Mbeumo and Schade after the equaliser.
BRENTFORD VS. SHEFFIELD WEDNESDAY MATCH STATS
Possession: Brentford 72% - 28% Sheffield Wednesday
Shots: Brentford 13 - 9 Sheffield Wednesday
Shots on target: Brentford 5 - 5 Sheffield Wednesday
Corners: Brentford 5 - 2 Sheffield Wednesday
Fouls: Brentford 8 - 9 Sheffield Wednesday
WHAT NEXT?
Brentford will have to wait until tomorrow before finding out who they will play in the quarter-finals, but they do know will face local rivals Fulham in the Premier League at the weekend at Craven Cottage, while Sheffield Wednesday host Watford at Hillsborough.