Dunn associated with the known bushrangers Ben Hall and John Gilbert. Dunn joined the Hall gang in October 1864, a welcomed new member after police captured gang members Dunleavy and Mount. In late 1864, during the robbery of a mail coach near Jugiong, Gilbert shot and killed Sergeant Parry. On 26 January 1865, Hall, Gilbert and Dunn were at Collector, near Lake George. While Hall and Gilbert were holding up the hotel, Dunn shot and killed the local police officer. Dunn twice fired, his first shot hitting once in the face and the second that pierced the heart. Constable Samuel Nelson was the sole policeman in the township and the father of eight. Dunn also shot at Nelson's son but missed. In May, Hall, Gilbert, and Dunn were proclaimed outlaws; the passing into law the Felons Apprehension Act 1865, which allowed known bushrangers to be shot and killed rather than taken to trial, this put them outside the law and liable to be killed by anyone. Hall had separated from the other two and later was surrounded by police in the bush near Forbes, New South Wales, and shot dead. Gibert and Dunn on hearing the news of Hall's death headed for Dunn's grandfather's property at Murrumbarrah.
Gilbert's capture and death
Senior ConstableCharles Hales of the Binalong police station received information at 8pm on 12 May 1865 that the two bushrangers had "stuck up" the woolshed near Murrumburrah. He suspected they would be in the area of Binalong due to Dunn's relatives living in the area. He thought they might visit John Kelly, Dunn's grandfather. Hale immediately gathered constables John Bright and Michael King and headed out to watch Kelly's house. They watched most of the night, but saw no one enter, so returned to the police station about half a mile away. The next morning at 8am John Kelly informed Hales that Gilbert and Dunn were at his hut. Hales gathered constables John Bright, Michael King and Henry Hall and headed to Kelly's place. The troopers watched for about an hour in the rain. At some stage Kelly's son, Thomas, approached the stockyard. Hales called him over to ask if there were strangers in the house, to which he said "No." Hales and King approached the house and the dogs started barking. John Kelly and his wife came to the door of the hut, and seeing Hales, Kelly called out "Look out, the hut is surrounded by bloody troopers." As Hales entered the hut two shots were fired, Hales looked through the slabs of the bedroom wall to see the shadows of two men. Hales immediately fired and ran to the front room of the hut. He then called out "Men, surround the hut—the bushrangers are inside". Hales warned Kelly if he did not immediately turn out, they would burn the hut. Hales heard firing in the paddock at the end of the hut. He ran out to the area and saw the bushrangers firing at King and Hall. The bushrangers kept up the fire as they got through a bush fence that led to the creek and took up position behind a large tree. Gilbert used his revolving rifle on Hales and Bright but it misfired. Meanwhile, King and Hall took up positions. Dunn and Gilbert started firing their revolvers at Hall and King, and ran down to the creek. Hales and Bright immediately fired at the bushrangers, at which time Gilbert was hit and killed instantly. Hales ordered his men to follow and to chase Dunn. King was left to guard Gilbert's body as King was wounded in the foot. The three constables chased Dunn for about a mile and a half, but they became exhausted and had to give up the pursuit. Dunn stole a horse from nearby Bogolong station and wasn't heard from again for seven months.
Captured
On 18 December, Dunn was recognised by police at McPhails Station near Walgett. Eight days later he was betrayed by those he trusted and after a fight with police was wounded and captured near Coonamble.
Escape
Dunn was taken to Dubbo where he was treated for his wounds, Dunn was kept in the police barracks, not the prison cells, because of the relentless summer heat. On 14 January Dunn escaped via an unlocked window at night. He was recaptured the next day by a hollow log near the river. He realised he was too ill to continue with his escape and tried to return to the barracks before collapsing at the spot where he was found. Back in custody, the law took no chances and with little mercy put Dunn on a dray bound for Sydney. Somehow Dunn managed to survive the journey.
Sentenced
He was charged with robbery, and for the murder of Constable Nelson, and on 19 January 1866, the jury took 10 minutes to find him guilty of murder and he was sentenced to hang. Dunn later signed a deposition stating that a friend was innocent of a crime that happened while Dunn ran with Ben Hall. Dunn stated on the day of the crime his friend could not be involved because Dunn was with him mustering horses. Dunn named eight other men who could testify on McCormack's behalf. McCormack was released in April and given a pardon in consequence of statements made by Dunn. Dunn was hanged in Darlinghurst Gaol on 19 March, he was 19 years old. He was buried in the Devonshire Street Cemetery, which was cleared and the dead reinterred elsewhere to make way for Central Railway Station.
Film and Television
John Dunn appears as a major character in the 2016 feature filmThe Legend of Ben Hall, portrayed by Melbourne actor William Lee, who was cast partially due to his resemblance of the outlaw. The film depicts Dunn's recruitment into the Ben Hall gang, his romantic involvement with Margaret Monks and the murder of Constable Nelson at Collector.