The findings confirm suspicions that opioids played a role in the death of the superstar musician, who was found dead April 21 at his Minneapolis-area estate.
It was not immediately clear whether Prince had a prescription for the drug and, if not, how he obtained it. At least one friend has said he suffered from intense knee and hip pain from many years of stage performances.
The results raised the possibility that anyone who provided the drug illegally could face criminal charges.
PHOTOS: Prince through the years
After Prince died, authorities began reviewing whether an overdose was to blame and whether he had been prescribed drugs in the preceding weeks.
According to a one-page report released by the Midwest Medical Examiner's Office, Prince administered the drug himself on an unknown date. The office said the death investigation is complete, and it had no further comment.
Fentanyl is a synthetic drug that is partly responsible for a recent surge in overdose deaths in some parts of the country. Because of its risks, it is tightly controlled by the Food and Drug Administration.
Pain patients who have built up a tolerance to other prescription painkillers, or who have become addicted, sometimes seek out stronger drugs such as heroin or fentanyl.
More than 700 fentanyl-related overdoses were reported to the Drug Enforcement Administration in late 2013 and 2014. The drug also has legitimate medical uses.
Prince, 57, died less than a week after his plane made an emergency stop in Moline, Illinois, for medical treatment as he was returning from an Atlanta concert. The Associated Press and other media reported, based on anonymous sources, that he was found unconscious on the plane, and first responders gave him a shot of Narcan, an antidote used in suspected opioid overdoses.
The autopsy was conducted the day after Prince's body was found. When his body was examined, he was 5 feet 3 inches tall, weighed 112 pounds and was dressed almost entirely in black. He had scars on his left hip and right lower leg.
The focus of the investigation will now probably turn to determining who supplied the fentanyl and whether the sources were legitimate or illegal, said Gal Pissetzky, a Chicago-based attorney who has represented multiple clients facing drug charges. He has no link to Prince.
Authorities may also look to the singer's associates.
"The investigation may expand to people who surround him," Pissetzky said. "If fentanyl was obtained illegally, I don't think Prince would have gone out to meet someone in a dark alley to get the substance."
IN MEMORIAM: Celebrities and notable figures who have recently passed away
If a street dealer was the source, identifying that person will not be easy.
"It'll be very, very difficult," he said. "These guys don't write receipts, and they change phones all the time."
Illegally distributing fentanyl to someone who then dies from it is punishable by a mandatory minimum sentence of 20 years under federal law. Under Minnesota law, the same actions can result in third-degree murder charges and up to 25 years in prison.
The names of at least two doctors have come up in the death investigation being conducted by the Carver County Sheriff's Office, the U.S. Attorney's Office in Minnesota and the Drug Enforcement Administration.
Dr. Michael Todd Schulenberg, a family practitioner, treated Prince twice in the weeks before his death and told investigators he prescribed medications for the singer. The medications were not specified in a search warrant for the Minnesota hospital that employed Schulenberg at the time.
Schulenberg saw Prince April 7 and April 20 - the day before his death - according to the warrant. Schulenberg's attorney has declined to comment on the case.
Dr. Howard Kornfeld, a California addiction specialist, was asked by Prince's representatives on April 20 to help the singer.
Kornfeld sent his son Andrew on a redeye flight that night, and Andrew Kornfeld was among the people who found Prince's body the next morning, according to Kornfeld's attorney, William Mauzy.
The younger Kornfeld, who is not a doctor, was carrying buprenorphine, a medication that can be used to treat opioid addiction by easing cravings and withdrawal symptoms, Mauzy said, explaining that Andrew Kornfeld intended to give the medication to a Minnesota doctor who had cleared his schedule to see Prince on April 21.
Mauzy has refused to identify that doctor. Schulenberg is not authorized to prescribe buprenorphine.
Prince's death came two weeks after he canceled concerts in Atlanta, saying he wasn't feeling well. He played a pair of makeup shows April 14 in that city, and then came the emergency landing in Moline. He was scheduled to perform two shows in St. Louis but canceled them shortly before his death.
The superstar had a reputation for clean living, and some friends said they never saw any sign of drug use. But longtime friend and collaborator Sheila E. has told the AP that Prince had physical issues from performing, citing hip and knee problems that she said came from years of jumping off risers and stage speakers in heels.
Confirmation that Prince died of an opioid overdose was first reported by the AP. The autopsy report was released hours later.