Media playback is not supported on this device
Off-spinner JP Duminy took a hat-trick and leg-spinner Imran Tahir 4-26 as Sri Lanka were bowled out for 133.
The Proteas then eased to their target for the loss of only one wicket in 18 overs, with Quinton de Kock making an unbeaten 78.
They go on to a last-four meeting with New Zealand or West Indies in Auckland on Tuesday.
South Africa's first knockout victory in 23 years of playing World Cup cricket takes them to a first semi-final since a famous defeat by Australia in 1999.
In reaching their target with 32 overs to spare, AB de Villiers' side also completed the fastest successful run chase in a World Cup knockout match as Sri Lanka, finalists in the previous two World Cups, wilted.
Their lacklustre display was not befitting what turned out to be the final international match for Mahela Jayawardene and Kumar Sangakkara's last ODI. The duo have scored 117 international centuries between them.
After the Proteas' pace bowlers made early inroads, the spin pair of Duminy and Tahir took advantage of a succession of loose shots, while South Africa were excellent in the field throughout.
Sangakkara, on the back of four successive hundreds, made a painstaking 45 and Lahiru Thirimanne a counter-attacking 41, but no other batsman reached 20.
To cap South Africa's day, wicketkeeper De Kock, who had managed only 53 runs in his six previous innings, returned to form with a string of cover drives.
Still, their victory was built on a brilliant bowling performance after losing the toss on an excellent pitch.
New-ball pair Kyle Abbott and Dale Steyn took the edges of Kusal Perera and Tillakaratne Dilshan respectively before Sangakkara and Thirimanne steadied with stand of 65.
While Thirimanne was fluent through the off side, Sangakkara was stodgy, taking 16 balls to get off the mark and, at one point, having six from 42 balls.
When Thirimanne became the first of the seven wickets to fall to spin, Sangakkara was forced to watch from the other end as the middle and lower order fell around him.
With the ball holding in the pitch, Thirimanne patted back to Tahir and Jayawardene lobbed the same bowler to short mid-wicket.
Duminy, filling the fifth bowler slot which has caused South Africa problems during the tournament, then got to work to become the first Proteas player to take a World Cup hat-trick.
Media playback is not supported on this device
Angelo Mathews was caught at mid-on and, in Duminy's next over, Nuwan Kulasekara feathered behind before debutant Tharindu Kaushal was pinned leg before.
For 19-year-old Kaushal, it was a golden duck on his ODI debut having being added to the Sri Lanka squad on the morning of the match.
Sangakkara was left to play a lone hand, but his attempt at aggression was ended with a slash to third man off Morne Morkel.
He departed with 14,234 runs, a tally second only to Sachin Tendulkar, in 404 matches. This was the 150th one-dayer in which he batted with Jayawardene, who has 12,650 runs.
The ruthless South Africa chase ensured that they will not share another international partnership.
Listen to highlights from Test Match Special's and 5 live Sport's 2015 World Cup coverage.
South Africa cruised into the World Cup semi-finals with a one-sided thrashing of a sorry Sri Lanka in Sydney.