The Dutch international defender had the test following the Uefa Cup quafter-final against Celta Vigo on 15 March.
"And afterwards I was informed that I gave a positive result.
"I produced a result of 8.6 on the test when the limit is two.
"I am not worried, though, because I have a totally clear conscience and I am now waiting for the second test.
"I don't know why that substance was in my body, I have never in my life taken any banned substance," said De Boer.
"I would put my hand in the fire to swear my innocence, because I have never taken that substance.
"I am very surprised by the result because I know I am completely innocent," he added.
De Boer said he had been informed of the result by club doctors after Barcelona's league game against Espanyol on Saturday.
Mystery
"I was told after the Espanyol match and I thought it was a joke, but unfortunately it wasn't. Now I am going to look for a way of resolving the matter."
Two weeks ago fellow Dutch international midfielder Edgar Davids, who plays for Italian Serie A team Juventus, denied using an illegal substance after testing positive for nandrolone.
Both players appeared for the Netherlands in the friendly against Turkey on 28 February.
"I did have to eat something while I was playing for the Netherlands, but I am not saying that it was the fault of the national side. We are going to investigate all the possibilities both here at Barcelona and in the national side."
"I have spoken with Edgar (Davids) and we will look for a solution together, although we still haven't found an answer yet.
"We are both players that have never taken anything strange in our lives. I've never even smoked a cigarette," insisted De Boer.