Seamus Coleman gave the visitors the lead with a fine finish after 18 minutes but substitute Eduardo Vargas smashed in the equaliser after the break.
Lennon restored Everton’s lead in the 77th minute and this time the Toffees held on as Adel Taarabt fired against the bar in injury time.
Rangers have now lost five home games in a row for the first time in the club’s history and remain second from bottom.
The result places extra significance on their next two matches at West Brom and Aston Villa while Everton can start looking up the table as they climbed up to 13th and eased their relegation worries.
Joey Barton returned to captain Rangers after serving a three-match suspension while Everton made just one change from the side that beat Newcastle, with John Stones coming in for Antolin Alcaraz.
The home side started the match on the front foot, but it was Everton who went closest to breaking the deadlock in the early stages as Leon Osman shot over the bar from a corner.
The visitors looked dangerous on the break and they took the lead following a well-worked counter attack after 18 minutes.
Osman passed the ball out for Coleman in space on the right and he produced a fine finish as his shot flew across goal and went in off the far post.
The goal came against the run of play but Rangers should have levelled 10 minutes later as Bobby Zamora headed wide from inside the six-yard box.
The chance was QPR’s best of the half as Everton started to see more of the ball and continued to look threatening on the break.
But the hosts went close to equalising just a minute after the break as Junior Hoilett curled a shot against the crossbar.
Mauricio Isla then made a good challenge to stop Osman shooting at the other end before Rangers grabbed the equaliser in the 64th minute.
Everton failed to clear Joey Barton’s corner and in the ensuing chaos the ball ended up with Vargas, who smashed the ball into the roof of the net from close range.
The hosts could have made it two soon after when Zamora broke free of Phil Jagielka but he fired over the bar from just outside the area.
The missed opportunity proved costly as the Toffees restored their advantage in the 77th minute.
Coleman’s cross was half-cleared by Nedum Onuoha under pressure from Arouna Kone, but the ball fell straight to Lennon, who side-footed home for his first goal in an Everton shirt.
The goal seemed to knock the stuffing out of Rangers but there was still one final chance in injury-time as a long ball up-field spilled out to Taarabt.
The Moroccan’s shot looked destined for the far corner but instead it clipped the bar and sailed over to send the home supporters away deflated again.
QPR: Green (5), Caulker (6), Isla (6), Onuoha (6), Yun (5), Barton (6), Hoilett (5), Sandro (5), Phillips (6), Austin (6), Zamora (5).
Subs: Henry (5), Taarabt (5), Vargas (7).
Everton: Howard (6), Baines (6), Stones (6), Jagielka (7), Coleman (7), Gibson (6), McCarthy (6), Lennon (7), Osman (6), Kone (6), Lukaku (6).
Subs: Barkley (6), Naismith (5).