Among the two arrested is nephew of Ahmed's brother-in-law Rehan, Inspector General of Police (Bareilly Zone) Vijay Kumar Meena told a press conference in Bijnor.
The alleged mastermind, identified as Muneer, is still at large and will be nabbed soon, Meena said.
Giving details, the IGP said that the accused followed the 45-year-old NIA Deputy SP on motorcycle after a wedding reception of a relative on the intervening night of April 2 and 3.
Ahmed was returning home in Sahaspur village of Bijnor district with his family after attending his niece's wedding in another nearby village in the same district, which is about 150 km from Delhi.
The attackers overtook his vehicle at Sahaspur village and Muneer allegedly fired at Ahmed, killing him on the spot, he said. His wife was critically injured in the shoot out, but his two children escaped unhurt.
Along with Rehan, his accomplice Zainul was also arrested.
About the motive of the crime, Meena said that it was borne out of domestic dispute, family matters and share in a property deal.
DGP Javeed Ahmed has announced a reward of Rs 50,000 to anyone who helped in his arrest.
The killers had pumped as many as 24 bullets into Ahmed and four into his wife Farzana, as their 14-year old daughter and 12-year old son watched the gruesome incident from the back seat of the Wagon-R car in which they were travelling.
In the beginning, the police termed the killing of Ahmed, posted as Inspector initially with the NIA's intelligence wing and later in its investigation department, as a "planned attack" and did not rule out the possibility of a terror angle behind the shootout.
Ahmed, who has been with the NIA ever since it was formed in February 2009, had been investigating many cases especially related to banned Indian Mujahideen terror outfit. His superiors termed him as a thorough professional in intelligence gathering as well as investigation.
NIA officer shot 24 times as children watched on
NIA officer's murder: Cops hunt for 2 unidentified wedding guests
2 detained for murder of NIA officer, property dispute likely motive
Pathankot probe: Pakistan's JIT team holds meetings with NIA officers
NIA quizzes caretaker of shrine SP claims to have visited before Pathankot attack