In a nerve-jangling finale, Leicester's Andy Goode had the chance to steal a win, but fired a last-minute penalty uncharacteristically wide of the target.
Leeds went into the game eight points adrift at the foot of the table, and only a win against England's finest would rescue them from near-certain demotion from the top flight.
Leicester had never won at Headingley going into this game, and Leeds players entered the fray with more than enough fire in their bellies to keep that run going.
As soon as the first scrum the fists were flying, and after his part in a scuffle with Mark Regan, Julian White was sent to the bin, and conceded the first of the six penalties Gordon Ross banged over.
Goode was also in good form with the boot, and a tight opening quarter yielded only four penalties shared between the two teams.
The Tykes cranked up the pressure nearer to half time though, and both David Rees on a run, and Tom Biggs following up a kick, came close to dotting down the game's first try.
Leeds were in the ascendancy though, and three more Ross penalties sent Leeds in 15-9 up at the break, with Goode's drop goal keeping the visitors in touch.
Goode narrowed the gap further after the break with another penalty, and then Leon Lloyd scored the game's opening try with half an hour remaining.
The Tykes' hitherto strong defence had no answer as Daryl Gibson and Ollie Smith combined to send winger Lloyd over in the corner.
Goode converted but Leeds were not willing to throw in the towel and responded with a try of their own from Biggs.
The score was all of the full-back's own making as he gathered the ball on halfway and made an arcing run to cross in the corner. Ross missed the conversion but added another penalty to increase the Tykes' lead to 23-19.
Goode cut the gap to one point with another three-pointer but Leeds managed to hold on to their slender advantage through the final twelve minutes of normal time and seven nerve-wracking minutes of injury time.
Finally Goode had the chance, but the long kick was off-target to the left, and Leeds can breathe again. the race to avoid the drop is not over yet.
For Leeds:Try: BiggsPens: Ross 6
For Leicester:Try: LloydCon: GoodePens: Goode 4Drop goal: Goode
Leeds: 15 Tom Biggs, 14 Andre Snyman, 13 Phil Christophers, 12 Chris Bell, 11 David Rees, 10 Gordon Ross, 9 Alan Dickens, 8 Alix Popham, 7 Richard Parks, 6 Scott Morgan, 5 Tom Palmer, 4 Stuart Hooper (c), 3 Gavin Kerr, 2 Mark Regan, 1 Mike ShelleyReplacements: 16 Matt Holt, 17 Rob Rawlinson, 18 Jon Dunbar, 19 Dan Hyde, 20 Mark McMillan, 21 Craig McMullan, 22 Diego Albanese
Leicester: 15 Geordan Murphy, 14 Leon Lloyd, 13 Ollie Smith, 12 Daryl Gibson, 11 Austin Healey, 10 Andy Goode, 9 Harry Ellis, 8 Martin Corry, 7 Neil Back, 6 Will Johnson, 5 Louis Deacon, 4 Martin Johnson (c), 3 Julian White, 2 George Chuter, 1 Darren Morris Replacements: 16 James Buckland, 17 Michael Holford, 18 Henry Tuilagi, 19 Lewis Moody, 20 Scott Bemand, 21 Sam Vesty, 22 Alesana Tuilagi
Kick-off: 14:30 GMTReferee: Sean DaveyTouch judges: tbc, Steve SavageAssessor: Colin High