Northampton took an 11-0 lead through Mark Robinson, but the Tigers hit back through Lloyd late into the first half.
Ben Kay's try put the Tigers in the lead after the break, only for John Rudd to put the Saints back in front yet again in the 48th minute.
But tries from Lloyd and Shane Jennings secured the victory for the Tigers.
Leicester needed to score four tries and win by at least seven points or more to qualify for the last four.
Northampton director of rugby Budge Pountney:
"The try they scored just before half-time was disappointing because that put extra pressure on ourselves. "I though we played good rugby. There's no-one more frustrated by our recent results than the players.
"They hate losing and we are all working as hard as we can to turn things around."
Leicester: Vesty, Lloyd, Smith, Cornwell, Murphy, Goode, Ellis, Holford, Chuter, Moreno, L. Deacon, Kay, B. Deacon, Jennings, Corry.
Replacements: Rabeni for Vesty (47), Hipkiss for Cornwell (72), Cole for Ellis (72), Buckland for Chuter (73), Young for Moreno (76), Hamilton for L. Deacon (65), Abraham for Jennings (55).
Northampton: Reihana, Lamont, Cohen, Davies, Rudd, Spencer, Robinson, Budgen, Thompson, Barnard, D. Browne, Gerard, Lewitt, Harding, D. Browne.
Replacements: Hartley for Thompson (47), Fox for Harding (55).
Not Used: Noon, Seely, Howard, Myring, Mallon.
Att: 11,072
Ref: Chris White (RFU).