"I know I let you down, and I'm sorry," Gordon said in a video. "Complacency led me to this, and I'm hurt. I urge you guys to be more responsible than I am about what goes into your body. I wouldn't wish this on anyone."
Gordon, who won the NL batting and stolen base titles last year, was reinstated before Thursday's game against St. Louis.
Gordon tested positive for two performance-enhancing substances and was suspended in late April. Gordon acknowledged in April that he unknowingly took the banned substances.
Marlins president David Samson said then that the second baseman had betrayed the team and its fans. On Wednesday, Samson said the Marlins are glad to have Gordon back.
"I believe that America and our fans and our players and us, we're a pretty forgiving society," Samson said. "It's important Dee ask for that forgiveness, and he has, and he'll receive that. He's got to continue to work to get himself back in with his teammates and the fans and my son."
In his video, the 5-foot-11, 170-pound Gordon said he learned from his mistake.
"I thought being the smallest guy I would never fail a drug test," he said. "I didn't pay attention at all and I didn't meet the standards. That's my fault and no one else's. But don't give up on me."
To make room on the roster for Gordon, the Marlins designated for assignment infielder Don Kelly, who had two triples in Sunday's victory. Even without Gordon, the Marlins have remained in contention for their first playoff berth since 2003.
Last year Gordon batted .333, stole 58 bases, became an All-Star for the second time and won his first Gold Glove. The season earned him a $50 million, five-year contract in January.