Media playback is not supported on this device
The British Horseracing Authority (BHA) has also banned 15 horses trained by the 37-year-old for six months.
Godolphin is run by the ruler of Dubai, Sheikh Mohammed bin Rashid Al Maktoum.
Q&A - read more
"Al Zarooni acted with recklessness and caused tremendous damage to Godolphin and British racing," said the stable's racing manager Simon Crisford.
"I think it will take a very long time for Godolphin to regain the trust of the British public. We're shocked and completely outraged by the actions he has taken."
Al Zarooni continued to be repentant after hearing of his punishment, saying: "I apologise to Sheikh Mohammed and all those at Godolphin, and the public who follow racing.
"I accept it was my responsibility to be aware of rules and regulations around banned substances.
"I can only apologise and repeat what I said in my statement earlier in the week - I have made a catastrophic error."
One of the banned horses is Certify, the former 1,000 Guineas favourite, who will be clear to race again on 9 October 2013, as will the other 14 suspended thoroughbreds.
Eleven horses were caught by drug testing, while Al Zarooni admitted at Wednesday's hearing to doping four others.
Al Zarooni gave the steroids ethylestranol and stanozolol, which are prohibited substances, to his horses and he was charged with violating multiple rules related to banned substances, as well as failing to keep medication records and with conduct prejudicial to the sport.
It's a hefty ban, but one that officials at the British Horseracing Authority say reflects how seriously they take their good record when it comes to drugs in the sport.
Not long ago Mahmood Al Zarooni, personally picked by Sheikh Mohammed to be his trainer, was rated a rising star, yet now his promising career lies in tatters.
Meanwhile, the Sheikh and the huge Godolphin operation will endeavour to re-group, but some of the mud is sure to stick, and things can never be quite the same again.
Steroids are allowed in some countries, including Dubai, out of competition.
Hopefully, this whole episode acts as a catalyst for the world's racing authorities to get their drugs rules consistent across the globe.
BHA chief executive Paul Bittar said he hoped the bans for Al Zarooni and the doped horses "will serve to reassure the public, and the sport's participants, that use of performance-enhancing substances in British racing will not be tolerated".
Bittar added: "We welcome the proactive response of Godolphin and Sheikh Mohammed in announcing their intention to review the procedures of this stable and the need to ensure that all horses formerly trained by Mahmood Al Zarooni are tested and cleared before they race again.
"The BHA will itself consider the wider issues raised by this matter and we will seek to ascertain and collate all other relevant information including, where necessary, interviewing other employees or contractors of Godolphin."
Sheikh Mohammed, who is worth an estimated £10bn, has "locked down" the Moulton Paddock stables in Newmarket where Al Zarooni trained.
Speaking before the ruling, Sheikh Mohammed said he was "appalled and angered" by the news that part of his operation "has violated Godolphin's ethical standards and the rules of British racing".
He added: "I have been involved in British horse racing for 30 years and have deep respect for its traditions and rules. There can be no excuse for any deliberate violation."
Rachel Hood, president of the Racehorse Owners Association, added: "The ROA was profoundly disturbed by the findings that anabolic steroids had been administered to horses at Moulton Paddocks stables, and we wholeheartedly support the BHA's disciplinary panel in imposing a lengthy ban on Mr Al Zarooni.
Artigiano, Bathrat Amal, Certify, Comitas, Desert Blossom, Fair Hill, Ghostflower, Opinion Poll, Orkney Island, Restraint of Trade, Sashiko, Sweet Rose, Tearless, Vacationer, Valley of Queens
"Our sport invests heavily in its integrity services, which includes the BHA undertaking over 8,000 drug tests annually, either on the racecourse or on a random basis at training yards.
"The fact that there have only been two cases of anabolic steroids being detected in recent years supports our view that this was an isolated incident."
Al Zarooni is one of two UK-based trainers - the other is Saeed bin Suroor - for the powerful Godolphin operation.
Since being appointed by Sheikh Mohammed in March 2010, Al Zarooni has trained a host of big-race winners, including 1,000 Guineas victor Blue Bunting in 2011.
Last year, he won the St Leger at Doncaster with Encke and the richest race in the world, the Dubai World Cup, with Monterosso.
Godolphin trainer Mahmood Al Zarooni has been banned from racing for eight years after doping horses at one of the world's leading racing operations.