Dunn went into hiding near Quambone Station (a farm) but another friend told the police where he was living. Dunn was shot and badly hurt when the police went to capture him on 26 December 1865. A policeman, McHale, was shot in the groin. Even though he was hurt, he climbed out of the police station window but was soon caught again. He was taken to Sydney to be tried in court. On 19 January 1866, he was found guilty of killing Nelson and sentenced to death. He was hanged on 19 March 1865 at the Darlinghurst Gaol. He was only 19 years old. He is buried in the old Devonshire Street cemetery in Sydney.