Carter had failed with two previous attempts, but at the third time of asking the star five-eighth was successful to steer the sub-par hosts home at the death in bitterly cold conditions.
Written off before the match after copping a 42-10 hiding in the first Test, the Irish led 10-9 at halftime and refused to yield on an emotion-charged night in the quake-ravaged city.
Roared on by dozens of Irish fans who have made Christchurch their home, Ireland threatened to snaffle their first-ever Test win over the All Blacks in their 26th attempt.
Jonathon Sexton's fourth penalty had levelled the scores at 19-19 with just over 10 minutes left and when the All Blacks were reduced to 14 men after Israel Dagg was yellow-carded they sensed their winless drought may be about to end.
But Carter, who chalked up 17 points, kept his cool to reward the Christchurch fans, watching their first Test in the city since earthquakes wrecked the city.
The hosts lacked the precision they displayed in Auckland and the passionate Irish lifted their game to outplay the error-strewn world champions for much of the match.
The Irish had promised they would up the intensity after being run off the park a week ago and they were true to their word.
They denied Kieran Read in the corner early on and then opened the scoring with their first foray into the All Blacks' quarter with a try to halfback Conor Murray.
Sexton's conversion gave the tourists a 7-0 lead after 12 minutes and he extended their advantage with his first penalty before the All Blacks got on the board through a Carter three-pointer.
Two more Carter penalties closed the gap as Ireland resorted to infringing to stop the All Blacks getting a roll on and a fourth effort fell just short as the tourists went to the break with a 10-9 lead.
That lead lasted just two minutes after the resumption before livewire halfback Aaron Smith grabbed his first Test try after a burst from Sonny Bill Williams.
Any thoughts that the floodgates might open were dispelled by Sexton who closed the gap with his boot and then traded penalties with Carter before his fourth success of the night levelled the scores to set up a dramatic finale.
But fittingly Carter, a Canterbury local, held his nerve to break Irish hearts.
NEW ZEALAND 22 (Aaron Smith try Dan Carter con, 4 pens, 1 dg) bt IRELAND 19 (Conor Murray try Jonathan Sexton con, 4 pens) at AMI Stadium.