A captain's century from Andrew Balbirnie and a disciplined effort from the bowlers guided the hosts to victory against the Proteas, giving them a 1-0 lead in the series with a match to go.
Having set the Proteas a target of 291, Ireland bowled the tourists out for 247 to register their first ODI win over South Africa.
Sent out to bat, Ireland's opening pair of Paul Stirling and Balbrinie continued their solid form, putting on a 64-run stand before Stirling was knocked over by Keshav Maharaj (1/50) for 27.
Balbirnie was joined by Andy McBrine in the middle to stitch together a fighting 90-ball 60 run partnership before Tabraiz Shamsi (1/42) trapped the latter in front for 30 in the 29th over.
Ireland win the 2nd ODI in Malahide 👏— ICC (@ICC) July 13, 2021
Andy Balbirnie earns the player of the match award after his seventh ODI century, setting up the hosts first-ever victory over South Africa.
📸: @cricketireland#IREvSA | https://t.co/tfI7lliJ6g pic.twitter.com/FROUipHwU1
Ireland continued to put up a determined display with the bat with captain Balbirnie leading the way, raising a seventh career ODI ton. The opener hit 10 fours and two sixes on his way to 102 from 117 balls, before mistiming Kagiso Rabada (1/58) straight to Temba Bevuma at mid-off.
The fall of Balbirnie ended yet another fifty-plus partnership - 70 off 79 deliveries - for Ireland between him and Harry Tector.
With a more than solid platform of 194/3 in the 42nd over, Ireland put the foot down through the final eight overs.
Tector partnered up with George Dockrell and the duo dispatched the South African bowlers with glee.
The pair combined for 90 runs in a mere 46 deliveries. Tector played an aggressive hand of 79 off 68 balls while Dockrell's quick-fire cameo of a 23-ball 45 propelled the hosts to a competitive total of 290/5 in their 50 overs.
In response, South Africa were under pressure from the getgo, losing Aiden Markram (5) to Craig Young (1/34) in the fifth over. He was soon followed back to the pavilion by Temba Bavuma (10) in 11th over to Josh Little (2/45).
A 108-run stand between Janneman Malan and Rassie van der Dussen put the visitors on track, taking them to 159/2 by the 33rd over but Malan's fall for 84 to Dockrell (1/37) swung the match back in Ireland's way.
Van der Dussesn (49) fell lbw to McBrine (2/34) in the following over, and he was quickly followed back by Kyle Verreynne (13), Andile Phehlukwayo (2) and David Miller (24) to leave South Africa at 201/7 in the 43rd over.
From there, it was always going to be too tough a task for South Africa to get into the match and so it proved.
The two teams next meet on Thursday in the third and final ODI.