But making the most of Dave Kilcoyne's yellow card, Leinster made their pressure count in the second half with O'Driscoll getting the game's only try just short of the hour mark, converted by Madigan.
Keatley added two more penalties to Madigan's one but it was not enough as the Munstermen's poor away record to Leinster continued with their fifth consecutive loss.
Munster had been forced into a reshuffle as captain Peter O'Mahony reported a tight hamstring prematch with CJ Stander coming into the starting line up in his place.
But there was better news from the kick off, as they were awarded a penalty on four minutes after Leinster infringed at the scrum and Keatley notched up the first points of the game.
And it was a similar result just five minutes later as Munster's quicker attack again caused problems in the Leinster defence and Keatley obliged to make it 6-0.
The visitors were enjoying much more territory in the opening 20 minutes, and Keatley made it a hat-trick of penalties on 22 minutes to extend his side's lead.
But having won their last nine matches in all competitions, Leinster were showing no sign of panic and slowly started to work their back in as the half progressed.
Ian Madigan slotted over a penalty on 25 minutes to open his side's account but with Leinster's scrum creaking again, Keatley's penalty re-established the nine-point lead.
Leinster went for a final push before the break and with Madigan slotting over one of two chances, it left the scores finely balanced at 12-6.
And they carried on from where they left off after the break, with Eoin Reddan displaying sharp reactions at the back of the scrum to pick up the ball and break up the field into Munster territory.
The hosts managed to retain possession before Rob Kearney missed with a drop goal attempt, but referee Alain Rolland brought play back for an infringement by Tommy O'Donnell and Madigan put away the penalty for 12-9.
And they drew level on 51 minutes as Madigan again provided the points with his boot as Munster were penalised for not rolling away.
All the momentum was now firmly with the hosts and Munster's rising penalty count finally proved too much for Rolland with Kilcoyne sinbinned before Shane Jennings found the gap to gain further territory.
And the breakthrough finally arrived just three minutes short of the hour mark, as Leinster made the most of the man advantage, Jennings again finding the space before offloading to O'Driscoll to run in.
Madigan added the conversion and Leinster took the lead for the first time in the match with 20 minutes remaining.
Munster were not about to roll over however, as they immediately went on the attack with Casey Laulala leading the charge with CJ Stander just held up on the line after a strong defensive effort from Leinster.
And the visitors did come away with a penalty with Keatley reducing the arrears to 19-15 with his fifth penalty of the night before his sixth three-pointer with a minute left on the clock made it a one-point game.
But JJ Hanrahan was penalised for crossing and Madigan slotted over his sixth attempt from seven to confirm victory.
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the RaboDirect PRO12
Leinster Rugby Score Card | |||||
Name | Tries | Conv | Pen | Drop | Pts |
---|---|---|---|---|---|
Brian O'Driscoll | 1 | 5 | |||
Ian Madigan | 1 | 5 | 17 | ||
Total | 1 | 1 | 5 | 22 |
Munster Rugby Score Card | |||||
Name | Tries | Conv | Pen | Drop | Pts |
---|---|---|---|---|---|
Ian Keatley | 6 | 18 | |||
Total | 6 | 18 |
|