The thoroughly deserved four points - they might have got five but blew a try in the last minute - kept fourth-placed Ulster in control of their own destiny heading into the final round of regulation games next weekend, in which they visit the Ospreys.
Leinster - now in third - will still be chasing a top-two finish when they host Treviso and will get it with a bonus-point win.
Leo Cullen's squad can have few complaints at the outcome after having both Rob Kearney and Luke Fitzgerald sin-binned, and now must deliver a big performance at the RDS next weekend.
Ireland topple New Zealand to lay down World Cup marker
Ulster scored three tries on their way to beating their inter-provincial rivals, the first coming in the opening 40 minutes from a controversial penalty try - which resulted in Kearney's sin-binning - with second-half scores from Jared Payne and a later intercept effort from Paddy Jackson sealing the four points.
Jackson had a great game and outshone Jonathan Sexton to score 18 points while also managing a 100 per cent kicking return from three penalties and two conversions, with scrum-half replacement Paul Marshall converting the fly-half's late try.
Leinster only managed two Sexton penalties, which both came in the first half.
Ulster suffered a pre-match setback when wing Craig Gilroy withdrew an hour before kick-off with a virus, but the hosts' work-rate in defence and ability to take their chances proved decisive.
This crunch encounter began in ferocious fashion with huge hits going in from both sides, and only really settled down after 11 minutes when Jackson got the scoreboard moving with a penalty after Luke McGrath had illegally blocked Andrew Trimble.
The game exploded into life in the 17th minute when, after a period of Ulster pressure, Ruan Pienaar dummied with Trimble and flew through a gap just inside the Leinster 22.
The South African chipped the ball but was then taken out by Kearney, which resulted in the Leinster player being shown yellow and referee George Clancy awarding a controversial penalty try.
Jackson converted and Ulster led 10-0, though to Leinster's credit they not only survived Kearney's binning without conceding but managed to win it 3-0 with Sexton's excellent 27th-minute penalty cutting the home team's lead to seven points.
They then got another three back on 36 minutes after Luke Marshall was adjudged to have hit Josh van der Flier high with Sexton adding another great penalty, this time from out near the left touchline.
The half then ended with a huge Leinster attack off a lineout take from Devin Toner, with Sexton and Garry Ringrose showing some neat touches, though Ulster's defence held firm with Callum Black's tackle on Hayden Triggs, on the line, forcing the knock-on.
It looked a big moment as Ulster were able to make it to half-time leading 10-6.
The home side then managed to botch a great scoring chance early in the second half from a five-metre scrum under Leinster's posts, but the visitors did the same shortly afterwards when knocking on from a lineout maul.
Ulster then brought play deep into the visitors' territory and nailed a crucial penalty on 54 minutes after Rory Scholes - Gilroy's replacement - had been held back by Fitzgerald, who had been one of a raft of Leinster substitutes to just come on from their powerful-looking bench.
Jackson kicked it to stretch Ulster's lead to 13-6, while Fitzgerald became the second Leinster player to be binned.
This time Ulster made their man advantage count, with Jackson the creator after the home side moved the ball from a lineout maul. Payne was put clear by Luke Marshall's pass, and made the line, with Jackson then converting.
At 20-6, Ulster now had control and they rubber-stamped their win with 10 minutes remaining thanks to another Jackson penalty.
The fly-half then intercepted Eoin Reddan's pass with two minutes left and ran most of the length of the field to dot down, with Paul Marshall adding the extras.
Ulster then went chasing the bonus point, but Darren Cave's pass to Scholes did not stick in the game's final move.
Ulster topple Leinster to remain on track for Guinness PRO12 play-offs
Two tries for Tommy Bowe on return from injury as Ulster thrash Zebre