Miller plundered a robust 85 not out off 72 balls to steer South Africa to 223-7 after unorthodox spinner Ajantha Mendis had reduced the tourists to 154-7 in the 42nd over.
Tsotsobe then ripped through Sri Lanka’s top order with three wickets in the space of six runs before finishing with 4-22 as the hosts were bundled out for 167 in the day-night game.
The victory ended South Africa’s 11-match losing streak in one-day cricket on Sri Lankan soil and gave AB de Villiers' tourists a badly-needed win in the current series.
Photos: Shah Rukh Khan, Shweta Bachchan at Karan Johar's book launch
Photos: Sunny Deol with sons Karan and Rajvir at Mumbai airport
Photos: 10 beautiful moments that capture winter around the world
Photos: Karisma Kapoor, Preity Zinta, Shraddha Kapoor at Mumbai airport
Spotted: Anushka Sharma and Diljit Dosanjh at Mumbai studio