The US Anti-Doping Agency (Usada) said the 35-year-old failed to provide details of his whereabouts for testing on three occasions within 18 months.
He will be stripped of any result he achieved from 17 November, 2012, the date of his third failure to comply.
Gold: 2004 Olympic 200m, 2001 World Indoor Championships 200m
Silver: 2008 Olympic 200m, 2004 Olympic 4x100m relay, 2004 World Indoor Championships 60m
Bronze: 2001 World Championships 200m
But his agent said Crawford retired after missing out on London 2012.
Crawford failed to qualify for last year's Olympics after finishing seventh in the US trials final.
"He's 35 years of age, and has moved on," his representative Kimberly Holland told Reuters.  "Unfortunately, his announcement wasn't enough, as he had to complete retirement paper work to be removed from the testing pool."
Crawford also won silver in the 200m and the 4x100m relay at the Beijing Olympics.
When Usain Bolt won the first of his Olympic 200m titles in 2008, Crawford originally finished fourth, but was given the silver medal after Wallace Spearmon and Churandy Martina of Netherlands Antilles were disqualified for running out of their lanes.
Crawford later gave his medal to Martina, who would have been the first Olympic medallist from his country.
In 2003, he took part in a US television programme that saw him race against a zebra and a giraffe. He beat the giraffe but lost twice to the zebra after demanding a rematch following a false start.
Crawford won the Olympic 200m title in 2004, clocking a personal best of 19.79 seconds to defeat compatriots Bernard Williams and Justin Gatlin.
Usada said his ban would begin from 17 April, the date he received the sanction.
America's Shawn Crawford, the 2004 Olympic 200m gold medallist, has been banned for two years for not complying with out-of-competition drugs testing.