In August 2018, Salmond resigned from the SNP in the face of allegations of sexual misconduct in 2013 while he was First Minister. In a statement, he said that he wanted to avoid internal division within the party and intended to apply to rejoin the SNP once he had an opportunity to clear his name. The Scottish Government investigated the allegations. On 30 August 2018, Salmond launched a crowdfunding appeal to pay for the legal costs of seeking a judicial review into the fairness of the process by which the Scottish Government handled the allegations. Salmond closed the appeal two days later, 1 September, after raising £100,000, double the amount he wanted to pay for his legal costs. The government later conceded that its procedures had been flawed and paid more than £500,000 in Salmond's legal expenses. On 8 January 2019, he won his inquiry case against Scottish government. The Scottish government admitted it had breached its own guidelines by appointing an investigating officer who had "prior involvement" in the case. Salmond also asked permanent secretary to the Scottish Government, Leslie Evans, to consider her position. Evans stated that the complaints the government had received in January 2018 had not been withdrawn, so the option of re-investigating them remained on the table, once the police probe into the allegations had run its course. On 24 January 2019, Police Scotland arrested Salmond, and he was charged with 14 offences, including two counts of attempted rape, nine of sexual assault, two of indecent assault, and one of breach of the peace. In a statement outside Edinburgh Sheriff Court, he denied any criminality. He appeared in court on 21 November 2019 and entered a plea of "not guilty".
Trial
The trial started on 9 March 2020. His defence was led by Gordon Jackson with Shelagh McCall as his junior; the prosecution was led by Alex Prentice. The first witness was "Woman H", who gave an account of how Salmond allegedly tried to rape her in Bute House after a private dinner in June 2014. She had not mentioned this incident when she first talked to police in 2018. The defence suggested that she fabricated the allegations, which the witness rejected. One witness claimed that women were banned from working alone with Salmond within the Scottish civil service. On 23 March Salmond was found not guilty on 12 charges, not proven on one charge and one was withdrawn by the crown. Shortly after the trial, a tape emerged apparently showing Gordon Jackson on a crowded train making negative comments and naming two of the alleged victims in the case.