Justices N. Kirubakaran and S.S. Sundar warned TikTok that any video on the app violating conditions would be considered contempt of court.
India is a major market for social media platforms given its population of 1.3 billion people.
In a statement, TikTok welcomed the court decision and said it is committed to enhancing its safety features.
The Madras High Court in southern India imposed the ban on the mobile app earlier this month, expressing concern over pornographic content being made available through such apps.
The ban was challenged by the Chinese company ByteDance, which owns the app. Bytedance approached the Supreme Court to remove the ban, but the case was referred back to the High Court in Tamil Nadu state.
Muthukumar, an Indian who filed a petition in the court, said that TikTok encouraged pedophiles because the contents were very disturbing. Muthukumar, who uses one name, said the children who used the mobile application were vulnerable and may get exposed to sexual predators.
Apple and Google are expected restore the app soon.
Bytedance has stated that it remains "very optimistic" about the Indian market and plans to invest $1 billion in the country over the next three years, the Press Trust of India news agency reported.
In an interview with PTI, Helena Lersch, ByteDance's director of international public policy, said the company already has a content moderation team in India and that it is strengthening the team further.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.