Chasing 155 to win from a rain-reduced 17 overs, the Knights reached 157/5 to secure victory off the last ball.
Second in the standings, the hosts narrowed the gap on log leaders the Highveld Lions in a tight contest for the playoffs.
The Impi, South Africa's newest domestic franchise, looked on the verge of bagging their first win of the competition, with the home side needing 10 runs off the last two balls of their innings.
Australian seamer Ben Edminson, however, bowled a no ball with the penultimate delivery, which Werner Coetsee thumped over square leg for six.
Coetsee took just one run off the next ball, a free hit, and with two runs needed, Dean Elgar smashed a boundary to bag the win.
The Knights initially needed 179 runs for victory, but a rain delay two overs into their innings resulted in a revised target.
Openers Rilee Rossouw, who made 42 off 25, and Morne van Wyk, who hit 34, shared 55 runs for the first wicket, and Ryan Bailey contributed 31 to keep them on target.
Pumelela Matshikwe, who took 2/33, removed Bailey and Johan van der Wath in the second last over, as the Impi seemed set to break their winless streak, but the Knights sneaked through in the end.
Left-arm seamer Jandre Coetzee had earlier returned career-best figures of 4/34 as he tore through the Impi middle order, with the visitors losing five wickets for only 33 runs after getting off to a superb start.
Opener Luke Wright, however, thumped 75 runs off 39 deliveries, sharing a century stand with Ryan Canning, to get the Impi off to a rocketing start.
Canning, who hit 36 from 24 balls, fell in the 10th over, with Coetzee picking up the breakthough scalp.
While the visitors never really recovered, as they stumbled through the second half of their innings, the opening pair had done enough as the they posted a competitive total of 178/9.