The pills are commonly used to treat pain, and investigators have brought in the U.S. Drug Enforcement Administration to help with the case, the source said.
Investigators so far haven't found any indication that Prince had a valid prescription for the recovered opioid medications, according to law enforcement officials briefed on the investigation.
DEA investigators will focus on the source of the medication. The officials stressed Thursday it is still early in the investigation.
Investigators believe a health scare about a week before Prince's death, which caused an unscheduled landing of his plane in Illinois, was likely the result of a reaction to the pain medication, a law enforcement official said Wednesday.
The pilot told air traffic control that a passenger, later known to be Prince, was unresponsive.
Prince was treated for a potential overdose of pain medication, the official said.
The singer was reportedly rushed to a hospital in Moline, Illinois. His publicist, Yvette Noel-Schure, later said he returned home and was fine.
Prince was 57 when he died last week at his home in a Minneapolis suburb.
He was found unresponsive in an elevator at Paisley Park, his home and studio in Chanhassen, Minnesota. Paramedics performed CPR but were unable to revive him.
Carver County Sheriff Jim Olson said there were no obvious signs of trauma on Prince's body when he was found.
Prince was last seen alive at 8 p.m. Wednesday when he was dropped off at Paisley Park, the sheriff said. He was alone in the complex when he was found, which Olson said was not unusual given the performer's private persona.
Dr. Sanjay Gupta, CNN's chief medical correspondent, said opioid medications are widely used.
"There are plenty of people out there who get legitimate pain pills for legitimate pain concerns and they do well," Gupta said. "They come off of them with no problem, but there's a certain percentage of people who do become addicted to these, meaning they have to keep taking them."
Two million Americans were dependent on prescription opioids in 2014, when the most recent data was available, federal statistics show.
Gupta said it's uncertain that anything similar had happened with Prince.
Opioids are drugs that reduce pain by switching off pain receptors in the brain.
They are among the most widely prescribed drugs in the United States, the Centers for Disease Control and Prevention says. Prescription opioids include painkillers such as morphine, oxycodone and hydrocodone, according to the CDC.
Opioids produce an increased pain tolerance and a sense of euphoria. They trigger a craving when the drug is absent.
Autopsy results awaited
Investigators are still awaiting results of autopsy and toxicology tests for further understanding of why Prince died.
The Midwest Medical Examiner's Office in Ramsey performed the autopsy on the much-loved musician Friday.
Dr. A. Quinn Strobl finished the procedure in four hours, according to the office, but Strobl won't declare what caused Prince's death until after the office gathers all the relevant details. Doing so will take weeks.
On Thursday, a Carver County judge sealed a search warrant for Prince's home and any evidence coming from it, according to court documents.
A prosecutor and sheriff's deputy who requested the action said disclosure of the details could "compromise this law enforcement investigation," a sheriff's deputy and prosecutor said in requesting the action.