However, analysis of the urine sample provided by the 29-year-old has shown that the abnormal results were triggered by alcohol.
"I am glad that this ordeal is finally over," said MacLeod, who currently has 21 international caps to his name and appeared in all five Six Nations fixtures earlier this year.
"I never thought that an impromptu night out to celebrate the news that I was going to become a dad for the first time would lead to all this.
"I feel very frustrated that my sample was not tested for alcohol at an earlier stage of these proceedings - given the severity of the charge that I was facing, I would have expected that the alcohol test should have been performed as a matter of routine.
"Had that been the case, I would have been able to establish my innocence at a much earlier stage, I would not have been suspended and the details of this case would not have become public."
Prior to this case, MacLeod had been cleared last February of failing a previous doping test after he had taken an asthma inhaler without permission.