Phelps, who amazed the sports world by winning a record eight gold medals at the Beijing Games last summer, has apologised for the photograph, which showed him smoking a "bong" pipe at a student party in November at the University of South Carolina.
Reacting to the announcement by Richland County Sheriff Leon Lott that there was not enough evidence to prosecute those at the party, Phelps said he had learned "important lessons."
"It's a mistake I won't make again," the 23-year-old international swimming idol said in a statement.
The Richland County Sheriff's Department opened a drug investigation after the November incident came to light, raising speculation that the Olympic star could end up facing charges.
Sheriff Lott said Phelps had made a "bad decision" in his behavior last year, but he added: "He is also human and can make a mistake."
"Having thoroughly investigated this matter, we do not believe we have enough evidence to prosecute anyone that was present at the November party," Lott said in a statement.
"Michael Phelps and I agree that something positive needs to come from this incident and that is a message of not using drugs," he added.
USA Swimming this month banned Phelps for three months over the "bong" photo controversy, which also cost him an endorsement deal with US food giant Kellogg Co.
"I'm glad this matter is put to rest. ... For me, it's all about recognising that I used bad judgment. ... For young people especially – be careful about the decisions you make. One bad decision can really hurt you and the people you care about," Phelps said in his statement.
Phelps thanked his family and fans for their support.
"I will move forward and dive back into the pool, having put this whole thing behind me," he said.
The US sports world has been reeling from a number of recent doping scandals, including a public admission this month by baseball star Alex Rodriguez, the highest paid player in the game, that he took a banned substance from 2001 to 2003.
"Michael Phelps is truly an American sports hero," Lott said, adding: "My perspective is that the law pertains to everyone and our drug laws are to be enforced".
While saying no one present at the November party would face prosecution, Lott said a number of arrests had been made in connection with an investigation triggered by the incident, and illegal drugs had been found in the possession of those detained, who would be charged according to the law.
Follow Emirates 24|7 on Google News.