The 57-year-old singer was found dead April 21 at his Minneapolis-area estate.
According to a one-page report released by the Midwest Medical Examiner's Office, Prince administered the drug himself, but the date he took it was unknown. The office said it has completed its death investigation and had no further comment.
PHOTOS: Prince through the years
Fentanyl is a synthetic opioid, 50 times more potent than heroin, that's partly responsible for a recent surge in overdose deaths in some parts of the country. It also has legitimate medical uses. More than 700 fentanyl-related overdose deaths were reported to the Drug Enforcement Administration in late 2013 and 2014.
The findings confirm suspicions that opioids played a role in the musician's death. After he died, authorities began reviewing whether an overdose was to blame and whether he had been prescribed drugs in the preceding weeks.
Prince's death came 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 AP and other media reported, based on anonymous sources, that the superstar 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.
At least two doctors' names 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 was among the people who found Prince's unresponsive 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.