EXCLUSIVE

Bodybuilding sensation Rich Piana has died ... nearly 3 weeks after going into a coma following a medical emergency at his Florida apartment, TMZ Sports has learned.

We broke the story ... Piana collapsed while getting a haircut on August 7. His girlfriend, Chanel, tried to revive him but was unable to wake him.

Piana was rushed to a nearby hospital where he was placed into a medically induced coma -- but was unable to recover.

The District Six Medical Examiner in Florida confirms Piana passed away early Friday morning at the hospital.

A preliminary search at his apartment revealed more than 20 bottles of steroids and a white powder -- but it's unclear if the substances played a role in his death.

46-year-old Piana competed and won several bodybuilding competitions over the years -- including Mr. California -- and became an Instagram sensation, racking up more than 1 million followers.