"I call on remaining states, the eight remaining states, to sign and ratify the treaty without further delay," Ban said in Vienna at an event marking the anniversary.
"Nuclear testing poisons water, causes cancers and pollutes the area with radioactive fallout for generations and generations to come," he said.
"We are here to honour the victims. The best tribute to them is action, to ban and to stop nuclear testing. Their sufferings should teach the world to end this madness."
The CTBT, which was adopted by the UN General Assembly in September 1996, bans all nuclear explosions.
It has been signed by 183 states and ratified by 164 including Russia, France and Britain, three of the nine countries which have, or are thought to have, nuclear weapons.
But to enter in force, the treaty needs 44 particular "nuclear technology holder" states to ratify it, eight of whom have yet to do so.
These eight include the other six in the nuclear club -- the United States, China, India, Pakistan, North Korea and Israel -- as well as Iran and Egypt.
The US, China, Egypt, Iran and Israel -- the latter widely assumed to have nuclear weapons although it has never confirmed it -- have signed the treaty but not ratified it.
US President Barack Obama said in a major speech on nuclear weapons in Prague in 2009, shortly after taking office, that he would "immediately and aggressively pursue US ratification".
Seven years later, with Obama leaving office in January 2017 and the opposition Republicans controlling both houses of Congress, the issue appears to have been put on on the back burner.
Between the first nuclear test in the desert of New Mexico on July 16, 1945 and September 1996, more than 2,000 tests took place worldwide.
With the end of the Cold War, the US carried out the last of its 1,032 tests in 1992, Russia in 1990, its 715th. Britain's last was in 1991, France's and China's in 1996.
Since September 1996, there have been two tests by India and two by Pakistan in 1998, while North Korea said it conducted tests in 2006, 2009, 2013, and on January 6 this year.
Despite this de-facto "moratorium" on testing outside of North Korea, however, Ban said it would "never substitute for the legally binding CTBT".
The US was one of first countries to sign the CTBT in 1996, with then-president Bill Clinton calling it the "longest-sought, hardest-fought prize in arms control history".
But a push in 1999 to ratify the treaty in Congress failed, in what Arms Control Association analyst Daryl Kimball says was a "highly partisan and rushed vote".
"Since then, US partisan politics have prevented the United States from reconsidering the treaty. US inaction has, in turn, given the leaders of the seven other (holdout) states... an excuse for delay," Kimball told AFP.
Opposition from US lawmakers in 1999 was due in part to concerns that there was no international system of monitoring in place to make sure there was no illicit testing of nuclear weapons.
But in fact the Preparatory Commission for the Comprehensive Nuclear-Test-Ban Treaty Organization (CTBTO), the Vienna body set up to prepare for the treaty's entry into force, already has several hundred test detection stations in operation.
"Today, the questions that led many senators to vote 'No' have been answered and the CTBT is very much in the US security interests," Kimball said.
China's ambassador to UN in Vienna, speaking at the same event as Ban, said that the Chinese government "has consistently expressed its close support of the CTBT and we are trying hard to try to ratify the treaty as soon as possible."
He said however that there was opposition in the National People's Congress, China's equivalent of a parliament.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.