A bench comprising Asim Banerjee and Justice Kalidas Mukherjee announced the verdict after a 77-day hearing.
The High Court also acquitted three of the accused and reduced the quantum of punishment of another two.
The court also put a stay on the execution of both Ansari and Naseer for three months so that the duo can appeal before the Supreme Court.
A trial court had sentenced seven people including Ansari and Naseer to death in the case.
Ansari and others had appealed to the High Court against the death sentence given to them by a city sessions court.
Six policemen were killed in the attack in front of the American Centre here Jan 22, 2002.