Max Kretzschmar thought he had won the tie four minutes from time when he slotted home from close-range, but the goal was controversially ruled out as Josh Scowen, who did not touch the ball, was harshly ruled offside.
The hosts took full advantage of their reprieve and booked their passage into the semi-finals when Wanderers failed to clear a free-kick and Ajose scrambled home.
Ainsworth made five changes to the Wanderers side with Gary Doherty, Max Kretzschmar, Josh Scowen, Jo Kuffour and Steven Craig coming in for Anthony Stewart, Billy Knott, Matt Spring, Dean Morgan and Paris Cowan-Hall.
Craig’s start was his first in a competitive fixture since the 3-0 win at Plymouth Argyle on 14th September, while Cowan-Hall was not risked after limping off at half-time against Crewe last Saturday with a calf injury.
Chairboys started brightly and saw the majority of the ball in the opening five minutes with Craig finding space behind the Swindon defence.
However, it was the hosts who had the first shot of the game, and it came in the sixth minute, as Nicky Ajose and Dany N’Guessan linked up well before the latter blazed wide from a tight angle.
Swindon wasted a glorious chance to take the lead six minutes later when Massimo Luongo broke clear on the left, but his cut-back was behind Ajose, with Marvin McCoy doing well to block the striker’s view.
Mark Cooper’s side were seeing a lot of the ball in the midfield areas and Blues were made to work hard for possession. However, Swindon were struggling to create a clear-cut chance until Kretzschmar was forced into a fine block to divert Luongo’s shot over in the 20th minute.
McClure saw an effort diverted away for a corner, but it was still the hosts who were looking the most threatening and Alex Pritchard should have done better when he shot wide from eight yards in the 27th minute. Blues had been seeing a bit more of the ball, but Hause’s pass put Scowen in trouble and the midfielder lost possession as the Robins broke quickly.
Swindon were a coat of paint away from taking a deserved lead eight minutes from half-time when Pritchard’s angled drive beat Ingram, but crashed back off the far post. Again the break came from Wanderers wanting too long on the ball in the centre of the pitch.
However, it was Ainsworth’s men who took the lead against the run of play just before the break. Great play from Craig saw him drive into the area and the ball fell to McClure, who steadied himself expertly before firing low left-footed past Tyrell Belford from six yards.
That was to be McClure’s last involvement as he earlier picked up a head injury and was replaced by Morgan.
Wanderers, buoyed by the goal, started the second half well and Craig’s header was parried away by Belford after neat link-up down the right from Morgan, McCoy and Lewis.
But Swindon remained a threat and McCoy had to be at his best to block a goalbound effort before Ingram smothered the rebound on his loan, despite appeals that the ball had gone over.
McEveley wastefully fired high and wide from 20 yards after Lewis cleared a dangerous Pritchard cross, and that was an indicator that the hosts were becoming increasingly frustrated at Blues’ fine defending prevented them from creating clear chances.
It wasn’t all one-way traffic though as Hause volleyed over from the edge of the area after Doherty had flicked on Wood’s ball forward in the 64th minute.
Luongo stung Ingram’s palms the two minutes later, but Blues’ No. 1 was well positioned and made the save look comfortable.
Swindon’s Louis Thompson was perhaps lucky to stay on the pitch in the 70th minute after clattering into Scowen, but the referee produced just a yellow card.
Craig had become an increasingly important figure for Wanderers in the second half with his hold-up play, but he made way in the 72nd minute – shortly after picking up a booking - with Charles Dunne his replacement.
Wycombe’s well-drilled rearguard were finally broken 14 minutes from time, and in cruel fashion. Ryan Harley’s speculative free-kick was going wide until it deflected off Ajose and spun into the opposite corner, leaving Ingram stranded.
Ainsworth’s side thought they had grabbed a winner four minutes from time when Kretzschmar’s shot squirmed over the line, but the assistant controversially waved his flag for an offside on Scowen, despite the midfielder appearing level and involved in the play.
Knott saw a powerful low drive well saved by Belford as both sides pushed for a late winner, and the hosts were to strike again to save themselves the lottery of a penalty shootout.
Blues failed to clear their lines from a free-kick and a goalmouth scramble ended with Ajose firing past Ingram for a dramatic late winner.
Wanderers: Ingram, McCoy, Wood, Doherty, Hause, Kretzschmar, Lewis (c), Scowen, Kuffour (Knott), McClure (Morgan 45), Craig (Dunne 72).
Subs: Horlock, Arnold.
Swindon: Belford, Byrne, Hall, Ward (C), McEveley, Kasim (Harley 46), Thompson, Luongo, Pritchard, N'Guessan (Elganas 72), Ajose.
Subs: Foderingham, Elgabas, Barthram, Branco
Attendance: 3,940 (221 Wycombe)