Lisa-Marie Deetlefs gave South Africa a lead just before half-time from a penalty corner and they held that until Murakami equalised with a set-piece seven minutes from the end.
The first period of extra time was goalless but midway through the second period Japan were awarded a penalty stroke from which Murakami scored her second.
'Japan are ranked eighth in the world and we wanted to aim higher than that if possible,' said coach Zenjiro Yasuda.
'We wanted to reach sixth (in the world) and we were aiming for a medal at these Games.'
South Africa coach Giles Bonnet felt his side would use London 2012 as a stepping stone for improvement.
'Before we came we thought we had a chance of making the seventh-place play-off,' he said.
'I am slightly disappointed we didn't finish ninth but we are realistic in that we have a longer-term plan and are looking to the 2014 World Cup and Commonwealth Games.'