Oosthuizen, the 2010 Open champion, won 4&2 and will now play American Dustin Johnson in the quarter-finals.
Spieth, 22, won all three of his matches in the group stages of the competition but trailed from the fourth hole onwards and could not fight back.
Defending champion Rory McIlroy earlier beat Zach Johnson 1 up to advance.
World number three McIlroy, who made a birdie on the 18th to beat the reigning Open champion, now faces American Chris Kirk.
Jason Day, the champion in 2014, beat Brandt Snedeker 3&2 to reach the last eight.
The quarter-finals will be played later on Saturday, with the semi-finals on Sunday followed by the Championship match.
World number one Jordan Spieth is out of the WGC-Dell Match Play after losing his last-16 tie to South Africa's Louis Oosthuizen.