In the indictment, filed in the Southern District in Manhattan, prosecutors said that doctors were paid as much as $3,000 per speaking engagement and that the events were held in fancy restaurants. Rather than inviting doctors who were new to using the product, the guests were often friends of the speakers, or were doctors who had already attended similar events and were unlikely to learn anything new. Sign-in sheets contained signatures that were forged to make the events look legitimate, the prosecutors said.

Image The spray Subsys, Insys’s only product, contains fentanyl. It is approved for use only in cancer patients.

After the dinners, the doctors and sales representatives sometimes left for a strip club, where the doctors were not asked to pay a cover charge or for their drinks. Instead, they were entertained at a reserved table with bottles of liquor, according to the indictments.

But all of this attention did not come free, prosecutors argued: Mr. Roper and Mr. Serrano expected that the doctors would return the favor by prescribing more Subsys.

One top speaker, according to Mr. Roper’s indictment, was paid $147,245 in speaking fees in 2014 and accounted for about $1.2 million in prescriptions of Subsys that were reimbursed through Medicare. Another doctor singled out in the complaint was paid $112,340 in speaking fees in 2014 and prescribed $1.4 million worth of Subsys that was paid for by Medicare, according to the indictment. The doctors were not named in the indictment.

Approved in 2012, Subsys is a form of fentanyl that is sprayed under the tongue and is approved for use only in patients who have cancer and experience pain even though they are already on round-the-clock painkillers. Fentanyl can be deadly if it is prescribed in large doses to someone who has not already become tolerant to opioids.

Despite the drug’s tight restrictions, sales of Subsys have been strong, taking in $330 million in 2015. Although Insys was an early favorite with Wall Street, it has struggled as it has faced questions about its marketing practices. Its stock is down more than 50 percent in the last year, and fell more than 12 percent on Friday alone.

In 2014, an analysis by the research firm Symphony Health found that just 1 percent of prescriptions for Subsys were from oncologists, those who would be most likely to treat cancer patients. Doctors who prescribe Subsys must take a test that proves they understand the drug’s risks. But according to the indictment on Thursday, Mr. Roper gave a doctor answers to the test questions.