She became Kenya's first high-profile athlete to fail a test, when she tested positive for performance-enhancing drugs in September.
Jeptoo, 33, says she may have been prescribed some banned substances at a local hospital after a road accident.
She has become the 45th Kenyan athlete to have failed a doping test.
David Rudisha, the Olympic 800 metres champion, said he fears for Kenya's hard-won reputation after repeat allegations of doping.
"Athletics Kenya followed due process in her matter and it was appropriate that she serves a two-year ban," said the governing body's chief executive Isaac Kamande.
The ban comes only a few days after Athletics Kenya announced that eight more Kenyan athletes have been suspended for between one to four years for taking performance-enhancing drugs.
Over the last two years Kenya has been in the spotlight after a German television programme claimed that many Kenyan athletes are doping.
Jeptoo, one of most successful runners in Kenyan history, was due to be crowned world Marathon Major Champion for the year 2014 but the ceremony was called off soon after news of her failed test.
She has won the previous three Boston and two Chicago marathons and also previously won the Stockholm, Paris, Milan and Lisbon marathons.
Kenya's Rita Jeptoo, winner of the Boston and Chicago marathons, has been banned for two years after failing a drugs test.