Marte, 28, tested positive for the banned steroid Nandrolone. His 80-game ban is effective immediately, the MLB commissioner's office said.
"We are disappointed that Starling put himself, his teammates and the organization in this position," Pirates president Frank Coonelly said in a statement.
Marte said he had consumed the steroid unintentionally.
"I have been informed that I have tested positive in one of the tests that are regularly done in my job," Marte said in a statement.
"In this very difficult moment I apologize to my family, the Pittsburgh Pirates, my teammates, my fans, and baseball in general.
"Neglect and lack of knowledge have led me to this mistake with the high price to pay of being away from the field that I enjoy and love so much.
"With much embarrassment and helplessness, I ask for forgiveness for unintentionally disrespecting so many people who have trusted in my work and have supported me so much.
"I promise to learn the lesson that this ordeal has left me."
Marte had made a solid start to the season, with two home runs in 13 games. He made the National League All-Star team for the first time last season and also grabbed 47 stolen bases.
He also won a Gold Glove for the second straight season.