The operation, dubbed Operation Shakti, makes India part of a "super league" of nations to have achieved such a feat, Mr Modi said, alongside the US, Russia and China.
The announcement comes weeks after India engaged in aerial clashes with Pakistan over the disputed border of Kashmir. "This new technology is not directed against any particular country," the prime minister said.
Experts said the target of the test was most likely an Indian mini-satellite put into a relatively low orbit for the purpose of the test one month ago, rather than an asset belonging to any other country.
India is currently in election season, with polls opening in just over a couple of weeks, and under Indian law the government cannot make any policy or political announcements that might be seen as seeking to win votes.
Mr Modi's address, which he trailed as an "important statement" on Twitter, was simultaneously broadcast on All-India Radio and all national TV stations.
Questions will be raised over the timing of the test, so close to a general election. "That India had the ability to do this was already very well known," said Pallava Baga, NDTV's space editor.
Madhavan Nair, the former chief of the Indian space agency Isro, said that "Mr Modi has chosen to take this step… to show that we have capabilities in this area,” and that if another country targets India’s satellites, India could “respond in a timely manner”. He described it as a “great achievement for the country”.