Speaking at her evidence session in front of the harassment complaints inquiry on Wednesday, the First Minister was responding to claims from the former first minister the procedure was established to “get” him.
One of the central claims from Mr Salmond is the procedure was extended to former ministers due to the knowledge of potential complaints against him.
Alasdair Allan MSP asked Ms Sturgeon whether the procedure was created to “get” Mr Salmond.
In response, the First Minister said: “It wasn’t, absolutely, emphatically not.
"I just say to people, and again this is stuff we might get into later on, Alex Salmond has been, and I have said this many times, one of the closest people to me in my entire life and some people around this table know what I mean by that more than others might.
"I would never have wanted to ‘get’ Alex Salmond and I would never ever have wanted any of this to happen.”
Ms Sturgeon continued that if she could, she would “turn the clock back” and “find legitimate ways” to ensure nothing had happened.
She said: "Short of brushing complaints under the carpet, which would have been wrong to be, if I could turn the clock back and find legitimate ways that none of this would ever have happened, then I would.
"Alex Salmond has been for most of my life since I was about 20, 21 years old, not just a very close political colleague, a friend and in my younger days somebody I looked up to and revered.
"I had no motive, desire, to get Alex Salmond.”
The First Minister’s evidence session will continue throughout the day.
The Salmond inquiry is examining the botched handling of harassment complaints against Mr Salmond by the Scottish Government, which led to a £500,000 legal bill after the Government conceded a judicial review challenge on grounds the process was “tainted by apparent bias”.
Mr Salmond was also acquitted of sexual offence charges in a trial last year.