In an interview on STV's Scotland Tonight Alex Salmond also defended his government's refusal to say whether it sought earlier legal advice and rejected claims he misled the public.
It comes after the First Minister was branded "a bare-faced liar" after his deputy Nicola Sturgeon appeared to contradict his claim that ministers have consulted law officers on Scotland's uncertain future in Europe.
The First Minister confirmed today that an investigation is to be carried out into whether he breached the ministerial. He said he would refer himself to independent investigators, who will consider if he has broken the rules that govern ministers' behaviour.
Last night, when asked if legal advice would be published when it was received on Scotland's place in the EU, Mr Salmond said: "No. Well that (advice) will inform the White Paper on independence. That's the purpose of having the opinion, so that we can make sure that what we say about the process of independence is correct.
"If you take the UK government, which makes all sorts of pronouncements, they've said quite recently that they have a legal opinion on this question. Although, how on earth they can have a legal opinion before the agreement which describes the process, goodness only knows. They haven't published that."
The First Minister said he was acting under the Ministerial Code by not discussing legal advice.
"I would have to clear it with the Lord Advocate if I wanted to say I had not sought legal advice. The Scottish Government decided to stick to the convention, which every previous Scottish government had decided to stick to, until that point that came with the Edinburgh Agreement which actually settled the process of how Scotland could become independent.
"You go to court so that you can uphold the ministerial code because there are very important principles that are therein."
Labour MEP Catherine Stihler wrote to Mr Salmond yesterday asking him to investigate whether he had broken the Ministerial Code.
Ms Stihler's letter said: "Either the statement which your deputy minister gave is incorrect that no specific legal advice existed, or your answer to (BBC political interviewer) Andrew Neil is incorrect and your use of the ministerial code to not provide me with the information requested was an abuse of power.
"Can I ask where in the ministerial code does it allow ministers to defend a blank sheet of paper rather than answering a specific question yes or no?
"I call on your services to now formally investigate whether the ministerial code has been broken and whether a clear abuse of power and position has taken place."
The Scottish Government and the publicly funded Scottish Information Commissioner have run up legal bills arguing over whether Ms Stihler had the right to know if legal advice existed on Europe.
In the Scotland Tonight interview Mr Salmond said the Scottish Government's legal costs were "just less than £4,000". He said: "I would imagine the information commissioner's legal costs are somewhere around the same quantum, or something around that. That's incidentally a world away from the £100,000 which was claimed by a Liberal (Democrat) MP in the House of Commons today - a figure which is plucked out of thin air."
Meanwhile, Deputy First Minister Nicola Sturgeon today conceded that an "unfortunate" impression was created that SNP ministers had legal advice when they did not.
She told BBC Radio Scotland: "Given the fact that previously I think the impression had been created that we had legal advice that we were not prepared to reveal because somehow it did not suit our purposes, I think was an unfortunate one.
"Therefore when we were in a position to seek that legal advice we decided, I decided, to seek the permission of the Lord Advocate to tell the Scottish Parliament that."
Ms Sturgeon said Lord Advocate Frank Mulholland - Scotland's top law officer - had given her the go-ahead to tell MSPs she had now commissioned legal advice on the issue.
She explained ministers only felt able to go ahead and do this after the Edinburgh Agreement, which paves the way for the 2014 independence referendum, was signed with the Prime Minister last week.
The Deputy First Minister said: "We took a judgement last week that the Edinburgh Agreement had significantly changed things and provided the context in which we now thought it was right to seek that legal advice."
But Mr Neil told the same programme he was under the impression ministers already had legal advice.
Mr Neil said when he questioned Mr Salmond it "never crossed my mind that whether or not he had legal advice was a matter of contention". He stated: "The thrust of my interview accepted that he had legal advice because he had told me so."
Then, at First Minister's questions at Holyrood, Mr Salmond said Sir David Bell, the vice chancellor of Reading University and a former top civil servant in the UK Government's education department, will lead the investigation.
Mr Salmond told MSPs: "The findings of the independent advisers will be made public. I will accept them and I hope all members of this chamber will do the same."
The First Minister also pointed out that he had been cleared in each of the five previous cases where there had been an investigation into allegations he breached the ministerial codes.
"Each one has found in favour that the ministerial code has been abided by. I hope on this sixth occasion, given I have said I will accept the findings, the opposition parties will find themselves able to do the same."
Conservative leader Ruth Davidson demanded that Scotland's top law officer, Lord Advocate Frank Mulholland, come to the chamber to answer questions on the matter.
Meanwhile, Labour leader Johann Lamont hit out: "Why did the First Minister say he had sought advice from the law officers when he had not? Why did he go to court at our expense to stop the release of advice he knew didn't exist?"
Ms Lamont claimed it was "astonishing" that her rival had "asserted what Scotland's position would be in Europe post-independence, despite the fact that in five and a half years he hasn't asked the question".
She said: "The First Minister seems to be asking the people as Marx - that's Groucho Marx - asked before him 'are you going to believe me or the evidence of your own eyes?'."
The Labour leader continued her attack and said: "The First Minister wants an honest debate about what is going to happen in the future of Scotland, so he starts it by asserting we would be in the EU but we wouldn't have to join the euro.
"But the First Minister doesn't actually know, because in five and a half years he hasn't asked. Yesterday, the Spanish Foreign Secretary said Scotland would have to apply to be in the EU and would be at the back of the queue.
"The First Minister says he is wrong, but he doesn't know because he hasn't asked. The First Minister says we would keep the pound, but he doesn't know that either because he hasn't asked."
She went on: "The reality is the First Minister will say anything to get through the moment and then ask us to take his assertions on trust. But doesn't he realise after this week nobody trusts him."
Mr Salmond responded by quoting the Spanish Foreign Minister from February this year, saying he had said then that "no-one would object to a consented independence for Scotland".
He also told Ms Lamont the Scottish Government had now sought advice from law officers on the issue. Mr Salmond said: "We've sought the advice of the law officers and that advice will inform the White Paper on independence. That seems to me a substantial progress in this debate, giving Johann Lamont the information she claims she needs."
Mr Salmond also said the ministerial code had previously prevented him from saying whether or not his Government had sought legal advice on the matter.
He quoted from the code, saying: "The fact that legal advice has or has not been given to the Scottish Government by the law officers, and the content of the legal advice given to them or anyone else, must not be revealed outwith the Scottish Government without the law officers' prior consent."
Ms Lamont told him, though, that she was "asking for the information the people of Scotland require" on this issue.
She hit out at Mr Salmond and said: "I do feel for the First Minister. All his life he has fought for this and now he knows his argument doesn't meet the times, now he knows it doesn't make sense for Scotland. So he makes things up instead.
"No-one wants the euro, so in his world he pretends we wouldn't have to have it, even although he knows we would, because before now Alex has always got his way.
"His need for a place in Scottish history comes before the people of Scotland's needs. And, as I said, I feel for the First Minister, his argument is falling apart in front of his eyes. His deceptions are being found out. No-one believes him any more."
She finally demanded: "How can this country have an honest debate about our future when we can't trust a word Alex Salmond says?"
Mr Salmond told her there were legal opinions that backed up the SNP's belief that Scotland would be able to join the EU.
He said: "I think it's important for Scotland to take its place as an independent member of the European Union.
"I think Johann Lamont should look at the huge number of authorities who have said that over the years, which I have cited many times. It's fundamentally important this chamber and the Scottish people see Scotland as an independent member, equal with other nations in the European Union."
Tory leader Ms Davidson continued the ill-tempered exchanges, drawing an angry reaction from SNP backbenchers for likening the First Minister to former US presidents Richard Nixon and Bill Clinton, who were both caught lying.
She demanded that Lord Advocate Mr Mulholland appears before parliament to answer questions about his role in the EU legal advice row.
"Neither this First Minister nor his deputy can be trusted to tell the truth," she said.
"Maybe the First Minister is not a crook, but the people of Scotland simply cannot believe a word he says. Because of him, we cannot believe a word his deputy says either.
"The one way to clear this up is for the Lord Advocate to come to this chamber to explain what law officers were asked, what they said and when."
Mr Salmond used another American presidential reference, suggesting Ms Davidson is like Republican candidate Mitt Romney for "dismissing" the vast majority of Scots as unproductive.
The First Minister did not respond to the direct call for Mr Mulholland to appear. But he said: "The great thing about law officers in Scotland under the Scottish Government is they're independent law officers.
"They don't, like the Attorney General, like the Advocate General for Scotland, go about in terms of the political argument. I think, basically, people in Scotland prefer their law officers to be independent and I think they'll keep it that way."
MSPs may get a chance to quiz the Lord Advocate in parliament even if the opposition calls are ignored. The scheduled portfolio question session for November 7 is Justice and the Law Officers, which sometimes features Mr Mulholland.