Tomos Williams and Gareth Anscombe claimed the decisive scores at a bitterly cold Cardiff Arms Park to seal top spot in Pool 2 despite three further tries being ruled out by referee Ian Tempest.
Honours were even at half-time after Cheslin Kolbe claimed the opening try for the hosts and Thomas Ramos landed a drop-goal.
A second Ramos drop-goal edged Toulouse into the lead but Anscombe responded with a try and a penalty to complete a fine win.
Cardiff Blues now travel to Lyon next Saturday in the final round, aiming to claim a home draw in the knockout stages.
The Blues, clearly fired up for the occasion, made a promising start to the encounter and following an early penalty they kicked to the corner.
They controlled both territory and possession and when they were awarded another penalty Tomos Williams took the quick tap and threatened.
He was tackled short but the Blues set up camp and on five minutes it appeared as though Nick Williams had powered over. However, following extensive replays it was deemed by referee Ian Tempest that he was in front of the ball when he picked it up and the effort was scratched off.
The Blues however, were playing with advantage and Jarrod Evans slotted the simple penalty from in front of the sticks.
With a star-studded squad, it was no surprise that Toulouse came storming back and they enjoyed a five-minute period in the ascent.
They kicked a succession of penalties to the corner but the Blues held firm and two sensational turnovers from Ellis Jenkins, making his first start since hamstring surgery, they were finally able to clear their lines.
From the ensuing lineout Cardiff Blues came within millimetres of claiming the opening try in stunning fashion. Alex Cuthbert hit a Jarrod Evans short ball at pace to burst through the French defence.
He embarked on an arcing run. He wasn’t quite able to reach the whitewash as the Toulouse cover defence took advantage of the angle and Garyn Smith failed to collect the wing’s offload as the chance went begging.
A generous penalty from Tempest allowed Toulouse to clear and on 25 minutes they claimed the opening try.
A fine counter-attack from Thomas Ramos put the visitors on the front foot and Joe Tekori took the ball to the line with venom.
It appeared as though the Blues had sufficient numbers to hold them out but a pair of outrageous offloads out the back in close quarters allowed top-scorer Cheslin Kolbe to squeeze over.
A towering up-and-under and collect from Gareth Anscombe and a thunderous Cuthbert hit inspired the home side and on the half-hour mark they struck.
Anscombe dinked a delightful chip over the Toulouse defence and collected at pace to slice through. He drew Ramos and delayed his pass perfectly to put Williams away.
Evans converted the effort to give the Blues a 10-3 lead as half-time approached but there was a major moment of panic when Semi Kunatani collected a speculative Toulouse chip.
He found Ramos in support and Tempest awarded the try but following a fierce protest from the Cardiff Blues faithful and the intervention of Gethin Jenkins, the referee finally went to the TMO despite Ramos attempting the conversion.
The try was rightly ruled out for an obvious forward pass and the Blues cleared but the French giants piled on the pressure in the final minutes of the half and finally settled for a Ramos drop-goal to level the scores.
Toulouse came flying out of the blocks in the second-half and capitalised on an early Cardiff Blues error to lay siege.
They opted for a scrum on two occasions they were awarded a penalty as they looked for big Joe Tekori to power over or a set-play from the back.
On the first occasion number eight Nick Williams flattened Sébastien Bezy and on the second Smith intercepted Jean-Marc Doussain’s flat-pass to Fickou.
He scythed through and Evans and Owen Lane combined to put Anscombe on the outside as they surged into the Toulouse half. The full-back grubbered ahead but Toulouse won the race to avert any danger.
The renaissance of the drop-goal continued in the second-half as Ramos nudged the visitors in front on 50-minutes.
Throughout the game Toulouse’s impressive size and power was matched by the work-rate and desire of Cardiff Blues and there was an overriding feeling that the game could be settled by a single moment of brilliance.
And Cardiff Blues delivered on 58 minutes as Cuthbert struck on a set move off the top of a lineout in a similar vein to the first-half.
He hit replacement fly-half Steve Shinger’s flat pass to slice through and found Willis Halaholo in support.
The centre drew the defence before firing another long pass off his right to Anscombe, who squeezed in the corner.
Anscombe was unable to slot the touchline conversion under huge pressure from Toulouse but his try had given Wales’ Capital Region a slender two-point lead over the four-time former European champions.
With Shingler now at fly-half and Lloyd Williams partnering him, the Blues utilised a tactical kicking game and it almost paid off instantaneously.
Shingler fired a ball against the grain to the left corner and when Ramos hesitated he was scragged to Anscombe.
The full-back managed to offload but Owen Lane ensured they were tackled over the line to concede a five-metre scrum.
Cardiff Blues turned the screw and it looked as though Jenkins had squeezed over but for a second occasion Tempest ruled the effort for being in front of the ball.
Amazingly, he made the same call 10 minutes later when Turnbull picked up on the edge of the 22 and cantered home.
The decisions of Tempest left the 7,152 crowd at the Arms Park momentarily silenced as Toulouse were given yet another lifeline.
However, Anscombe landed a late penalty to seal a historic double over the four-times former Heineken Cup champions.