The incident happened in south Belfast on 6 November 2013.
No-one was hurt and no firearms were recovered, but four men were arrested and two knuckle dusters and a wooden baton were recovered from the vehicle.
The officer who fired said he stumbled as he approached the car causing his rifle to slide up the window.
The incident was investigated by the police ombudsman.
Forensic examination of the car showed that the shot had been fired in an upward direction from very close range.
This tallied with the account of the officer.
He was a member of one of two police armed response units sent to intercept the vehicle over an earlier reported incident.
Police had been told shortly before 21:00 GMT that six men had called at a house, identified themselves as members of a paramilitary organisation, and asked to speak to one of the occupants.
They did not get into the house and were reported to have left in two cars.
Police circulated a description of the vehicles and advised that they contained firearms.
When one of the cars was spotted being driven in south Belfast, armed response units were authorised to force it to stop.
The four men who were in the vehicle were interviewed and said the officer had fired a shot at them after their vehicle was rammed as it was pulling over to stop.
Officers in the police cars said they forced the car to stop on the Donegall Road as it had failed to pull over.
Having reviewed the evidence, Police Ombudsman, Dr Michael Maguire, said the decision to forcibly stop the vehicle was lawful, in accordance with training and in proportion to the threat posed to members of the public.
He recommended that the officer be disciplined in relation to his handling of the weapon during the incident, and this has since been acted upon by the PSNI.
A policeman accidentally fired a shot after his gun hit the window of a car thought to contain armed paramilitaries an investigation has found.