INS Kalvari, a Scorpene-class submarine described as a "deadly predator", is one of six built by Mazagon Dock Limited in Mumbai as a part of Project-75 of the Indian Navy.
"Kalvari" is named after the tiger shark, a deep sea predator of the Indian Ocean; officials say the name reflects the submarine's agility, strength and predatory prowess.
INS Kalvari is the first conventional submarine to be inducted into the Navy after more than 17 years, even as the navy's submarine arm celebrates it golden jubilee in 2017.
"It is a big step in the field of defence...it will boost the Navy's might," PM Modi said, speaking at the commissioning function that also featured Defence Minister Nirmala Sitharaman and Navy chief Admiral Sunil Lanba.
The Kalvari went through 120 days of extensive sea trials and tests for various equipment, an official earlier said, adding the submarines have been designed by French naval defence and energy company DCNS.
The first Kalvari, commissioned in 1967, was also the first submarine of the Indian Navy. It was decommissioned on May 31, 1996 after nearly three decades of service.
India has just about 15 submarines, a mix of Russian-origin Kilo-class vessels and German HDW submarines. China has four times as many.