The 41-year-old, who has more than 3,000 career wins to his name, tested positive for the unidentified substance on September 16.
The suspension, imposed by French racing authority France Galop, will run until 19 May 2013, and will apply worldwide for the three-time champion jockey.
In a statement, Dettori said he "has let down the sport he loves" but most of all "his wife and children".
Solicitor Christopher Stewart-Moore said he had spoken to father-of-five Dettori, and the Italian had no arguments with the decision by France Galop.
"He is enormously grateful for the opportunities that he has been given by owners and trainers over the years, and for the support of his many fans," he said.
"Racing has been good to Frankie, and he knows that his privileged position brings with it responsibility. For this reason, he is determined to rebuild his reputation when he returns to the saddle in six months' time.
"He also accepts that he has let down the sport he loves and all those associated with it, as well as the wider public. But most of all - and this is his greatest regret - he has let down his wife and children."
The British-based jockey, one of the biggest names in flat racing, won all seven races in one afternoon at Ascot in 1996, costing bookmakers millions of pounds in payouts.
Dettori is no stranger to controversy, having won his first champion jockey title in 1994, the year after he was given a police caution for possessing a small amount of cocaine. He also survived a plane crash in 2000, and was champion for the third time four years later.
"Frankie could make excuses - he has, after all, regularly been tested for prohibited substances throughout his career," said his solicitor.
"He is clear, however, that the responsibility for his current situation lies squarely with him. From the start of France Galop's inquiry, he has acknowledged to them that he has made a mistake and that the fault was his."
- Sports & Recreation
- France Galop