The federal probe agency is tasked with probing terrorism and terror-financing related cases.
The Appointments Committee of the Cabinet (ACC) approved Modi's appointment as director general of the NIA, said an order issued by the Department of Personnel and Training (DoPT).
Modi will hold the post till his superannuation on May 31, 2021, the order said.
The ACC also approved the appointment of Modi as officer on special duty (OSD) in NIA with immediate effect to ensure a smooth takeover.
Modi, a 1984 batch IPS officer of the Assam-Meghalaya cadre, is at present special director in the Central Bureau of Investigation (CBI).
He will take over from Sharad Kumar after he completes his tenure on October 30, the order said.
Kumar, who was appointed DG NIA in July 2013, has been given two extensions.
In October last year, he was given a one-year extension, apparently to help the agency complete probe in Pathankot terror case and various ISIS related cases.
Kumar is the longest serving chief of the NIA. Under his stewardship, the agency started probing terror financing cases allegedly involving some separatists in Jammu and Kashmir.
Another senior IPS officer, Rajni Kant Misra, has been appointed director general of the Sashastra Seema Bal (SSB), which guards the Indo-Nepal and the Indo-Bhutan borders.
He will hold the post till the date of his superannuation, i.e. August 31, 2019, the DoPT order said.
Misra, a 1984 batch IPS officer of Uttar Pradesh cadre, is at present additional director general in the Border Security Force (BSF).