South Africa battled their way to a first Olympic point while Japan advanced to the quarter-finals as Group F runners-up at the Millennium Stadium.
Banyana Banyana had been convincingly beaten in their two previous games, but a committed defensive display saw them upset the odds and end their campaign with a draw against the world champions.
Striker Kozue Ando and midfielder Asuna Tanaka wasted the best opportunities for Japan, who will meet Britain in the quarter-finals if Hope Powell's side do not beat Brazil on Tuesday night.
Japan dominated from the off and Ando had two early chances as her shot was smothered by Thokozile Mndaweni, before heading wide from Karina Maruyama's pinpoint cross.
Having weathered the early storm South Africa grew in confidence and Portia Modise went close to breaking the deadlock with a powerful drive from distance that grazed the crossbar.
Mana Iwabuchi dragged an effort wide early in the second stanza as Japan reasserted their authority, while Ando fired across the face of goal after more good work by Maruyama.
South Africa saw midfielder Gabisile Hlumbane stretchered off after a collision with Mndaweni as the keeper came for a cross, but they continued to frustrate Japan.
Tanaka headed over under pressure at the far post before seeing Janine van Wyk produce a superb block to deflect her shot wide and preserve parity for South Africa.