Madigan added a further seven points with the boot as Leinster prevented Connacht from scoring - avenging the 34-6 defeat to their Irish rivals in September.
The win moves Leinster, who came into the match off the back of a 27-19 reverse to league-leaders Ulster and two Heineken Cup defeats to Clermont, above Ospreys into fifth in the standings.
Connacht started strongly and made life difficult for Joe Schmidt's side, but in the end lacked the clinical edge they needed and fell to a fourth RaboDirect PRO12 defeat on the bounce.
The visiting side had the better of the opening exchanges as they looked to replicate September's win and Danie Poolman could have scored a try had the ball bounced more favourably for him following an early kick ahead from Dan Parks.
The former Scotland fly-half then had the chance to put the side ahead after a good 15 minutes of pressure but he knocked his penalty wide to the left of the posts.
All the pressure was coming from the men in green but they were unable to make it show on the scoreboard, and slowly the European champions came into the game as the half progressed.
Eoin Griffin then broke through the Leinster backline but was brought down short of the line as Connacht looked to get the decisive opening score.
Spurred on by an increasingly vocal home crowd Leinster started to take control of the match, with Ireland wing Fergus McFadden almost going all the way with a break through a gap in the Connacht backline.
And it is the home side who take the lead, Madigan taking a quick tap-and-go penalty and going over in what was Leinster 's first foray into the visitors' 22 on 33 minutes.
After the TMO confirmed the try Madigan added the extras to put the home side 7-0 up - a lead they failed to increase before half-time despite some heavy pressure before the interval.
Despite trailing Connacht started the second half as they had the first, working through the phases and putting Schmidt's men under pressure - with the influential Parks almost releasing full-back Robbie Henshaw down the right flank.
But once again Leinster started to apply the pressure and, after Ben Marshall claimed lineout ball on the 22 they won a penalty in front of the posts after Connacht were penalised for not rolling away.
And fly-half Madigan dispatched the penalty with ease from 25 metres to give the home side a 10-0 lead.
The visiting side looked to be running out of chances to get back into the game and spurned a golden opportunity on 65 minutes after a superb Parks kick gave them a lineout deep inside Leinster's 22.
George Naoupu claimed it and the ball ended up in the hands of replacement prop Brett Wilkinson, but he fumbled the ball just a metre from the try line when he looked certain to cross.
And Leinster ensured it was a costly knock-on, crossing the whitewash to seal the win with their next attack after laying siege to Connacht's try line.
After Jordi Murphy was held up the European champions regained possession and eventually replacement prop McGrath crashed over, with Madigan adding a simple conversion to make it 17-0 with seven minutes to play.
|Leinster Rugby Score Card|
|Connacht Rugby Score Card|