JP Pietersen and Eben Etzebeth scored a try in each half for the Springboks, while Handré Pollard slotted four penalties and a conversion before Habana was removed with quarter of an hour remaining.
Argentina at least had the final word though with a converted try from prop Juan Pablo Orlandi in a subdued atmosphere.
Habana had three glorious chances in the first half, but just couldn’t quite find his way over, with the record clearly playing on his mind as he tried to do too much. He will finish on 15 tries, just like Lomu, while Drew Mitchell could yet overtake them both in the final.
It seemed to be almost the only thing riding on the game, with Argentina clearly still suffering from their loss to Australia, and decimated by injury.
Victor Matfield and Juán Martín Fernández Lobbe bid their farewells to the international scene, and could yet be joined by more, but that wasn’t enough to make up for the sloppy play on show.
Argentina showed all the adventure we’ve enjoyed during tournament, but were outclassed early, as a Pietersen try and three Pollard penalties were enough to establish a 16-0 half-time lead.
An early Nicolas Sánchez drop goal got Argentina on the board in the second half but the Springboks hit straight back with an Etzebeth try, as if to reinforce their superiority.
The biggest surprise came with 14 minutes to go as Jan Serfontein was introduced for Habana, the South African legend going off to huge applause and a little bewilderment.
And fittingly Argentina finally got over the line with the final play of the game, Orlandi powering over from close range.
South Africa flew out of the blocks and when Ruan Pienaar took a quick tap penalty, Tomás Cubelli couldn’t resist and grabbed him immediately. The scrum-half was sin-binned and South Africa capitalised.
After a driving maul, they spread the ball quickly to the right, where Pietersen was on hand to work his way over. Pollard converted from the touchline and South Africa led 7-0 after just six minutes.
They were almost over again three minutes later when Habana thought he’d scored the record-breaking try, but Lucas Amorosino got back in time to dot down before him.
Still, they were soon 10-0 ahead when Argentina were penalised for offside, Pollard slotting from in front as the Springboks made the most of their extra man.
Cubelli returned but it was still the Springboks dominating, and Habana was almost in again when he pounced on a loose ball, but the scrum-half got back to tackle him and force a knock-on. Earlier in the move Santiago Cordero had produced a stunning step away from a Schalk Burger tackle, and the diminutive winger certainly looked Argentina’s biggest threat with ball in hand.
Having looked thoroughly overwhelmed early on, Argentina finally established some field position just before the half-hour, and could have scored a try when Cubelli dummied and went on the 22, only to be hauled down just short of the line.
Habana then had his third chance at the record when Pollard stepped his way through but his wide pass was knocked on as the winger got over-excited at the chance of the try.
Another penalty for in at the side conceded by Argentina allowed Pollard to stretch the lead to 13 with his second penalty of the evening.
That was followed by yet another Habana opportunity, as he was released out wide, but after chipping over the top, he clipped the heels of Sánchez, who was also running back, and conceded a penalty as a result.
While South Africa dominated on the scoreboard, it was Argentina who were winning the crowd over by trying to run at every opportunity, with Matias Moroni beating a number of men before being tackled deep in the Bok 22.
However Argentine indiscipline was proving costly, as Pollard slotted a third penalty to make it 16-0 at the break after Juan Figallo was pinged at a breakdown.
The Pumas got hold of the ball early in the second half, and after a couple of drives, Sánchez dropped back into the pocket and slotted a sweet drop goal to get his team off the mark.
South Africa responded immediately, and while Habana wasn’t the scorer, he delivered the pass as Etzebeth went over on the left wing to make it 21-3.
Despite their huge lead, South Africa seemed happy to keep the scoreboard ticking over, with another Pollard penalty making it 24-3 when Argentina were caught offside after a Jesse Kriel break.
In an equally baffling decision, Argentina, trailing by three scores, also took a shot at goal, Sánchez knocking over a penalty when Francois Louw came in from the side.
With half an hour remaining, Daniel Hourcade started rolling out his replacements, notably removing Fernández Lobbe for what was his final appearance in a Pumas jersey.
Schalk Burger looked equally emotional as he departed a minute later, although he would return a little later as a blood replacement for Louw.
Just before the hour Argentina should have had their first try when they broke down the blindside. However Juán Leguizamon held onto a ball when Cordero was free outside him.
The game was a mess but not lacking in fight, with one melee occurring after South Africa had knocked on five metres out, with Etzebeth at the heart of it of the pushing and shoving.
Matfield then made his farewell for the Boks in his 127th and final appearance, four years after his last retirement before the curious removal of Habana.
What little rhythm there had been in the match had disappeared, and as if to show the farce of this match-up between two disinterested teams, replacement Pat Lambie attempted a penalty with 12 minutes left finding only the upright, before somehow missing touch from 15 metres away a minute later.
Still, Argentina kept coming and finally got their reward in the last minute, Orlandi finishing off a series of pick and drives. Sánchez converted to cap off a fine tournament, but it was the Springboks who finish fourth.