Over the past several years, the rapper Fetty Wap became known not only for releasing a stream of singles and mixtapes but for lending his name and likeness to a car racing video game and even walking down a runway during a Fashion Week in Manhattan.
He was also part of a Long Island-based drug ring, a part of his life that was hidden until last year, when F.B.I. agents arrested him at Citi Field just before he was to perform there as part of the Rolling Loud music festival.
Fetty Wap, whose legal name is Willie Junior Maxwell II, was arraigned on a charge of conspiring to distribute and possess narcotics. His legal problems worsened this month when his $500,000 bail was revoked after prosecutors said that he brandished a gun during a video call and threatened a man.
On Monday, a prosecutor told a magistrate judge, Steven I. Locke of Federal District Court in Central Islip, that although the indictment last year charging Mr. Maxwell and five other men cited heroin, fentanyl, cocaine and crack, Mr. Maxwell was accused only of conspiring to possess and distribute cocaine.
The prosecutor, Christopher Caffarone, told Judge Locke that in roughly the first half of 2020 Mr. Maxwell had conspired in Suffolk County to distribute “well in excess” of 500 grams of cocaine in New Jersey.
Minutes later, Mr. Maxwell, 31, pleaded guilty to that charge.
“I agreed with other people to distribute cocaine,” he told Judge Locke. “I knew the conduct was illegal.”
Judge Locke said that he would recommend to a district judge that Mr. Maxwell’s plea be accepted.
The charge Mr. Maxwell admitted to carries a maximum prison term of 40 years and a mandatory minimum of five years. Prosecutors said that Mr. Maxwell had waived his right to appeal as long as he was sentenced to 10 years and one month or less.
Mr. Maxwell’s lawyer, Elizabeth Macedonio, asked Judge Locke for expedited sentencing, saying her client was being held in “the harshest conditions” inside a special housing unit at a federal jail in Brooklyn.
After the arraignment, Ms. Macedonio said outside the courtroom that Mr. Maxwell had not made any agreement to cooperate with the authorities.
Mr. Maxwell, who is from Paterson, N.J., rose to fame in 2015 with the single “Trap Queen,” in which he sang and rapped about cooking and selling drugs, mused about buying a Ferrari and a Lamborghini, and declared: “In love with the money, I ain’t never lettin’ go.”
The song, which The New York Times later described as “shimmering and yelping and borderline whimsical,” was nominated for a Grammy in 2016.
Fetty Wap’s self-titled debut album, released in 2015, made it to the top of the Billboard 200. Although collaborations followed with Nicki Minaj, Snoop Dogg and the Canadian rapper Drake, Mr. Maxwell was not able to match his earlier success.
Still, he found ways to stay in the public eye. It was announced in 2016 that Mr. Maxwell was collaborating on a video game in which users control cars that drag-race through urban streets. (The following year he was arrested and accused of drag-racing; a police camera was said to have recorded him weaving through traffic on the Gowanus Expressway in Brooklyn while reaching speeds of over 100 miles per hour.)
During Fashion Week in 2017, Mr. Maxwell appeared on a runway inside the New York Public Library’s main branch on Fifth Avenue wearing a black shirt emblazoned with a skull and crossbones by the German designer Philipp Plein.
Last year, Mr. Maxwell was among six men, one of them a New Jersey corrections officer, accused of distributing more than 100 kilograms of drugs between roughly June 2019 and June 2020. The authorities said that the men imported the contraband from the West Coast using the United States Postal Service and drivers with hidden vehicle compartments, before storing the drugs in Suffolk County.
There, law enforcement officials said, “cutting agents” were often used to turn one kilogram of narcotics into as many as four before the drugs were distributed to lower-level dealers. Prosecutors described Mr. Maxwell as “a kilogram-level redistributor.”
Search warrants executed during the investigation yielded about $1.5 million in cash, 16 kilograms of cocaine, two kilograms of heroin, numerous fentanyl pills, two 9-millimeter handguns, a rifle, a .45-caliber pistol, a .40-caliber pistol and ammunition.
Although five defendants were charged with using firearms in connection with drug trafficking, Mr. Maxwell was not. But he was accused of possessing and displaying a firearm late last year while on a FaceTime call with a man identified in court papers only as “John Doe.”
A recording of that video obtained by the government showed Mr. Maxwell pointing a black pistol at the screen. In an affidavit filed with the court, an F.B.I. agent who reviewed the recording said it also showed Mr. Maxwell making threats, saying “your man is a rat” and “I’m gonna kill you.”
As the proceeding on Monday ended, Mr. Maxwell turned to face his supporters in the gallery.
“I love you,” he called to them in a soft voice. They replied in unison, repeating the same words back to Mr. Maxwell as he was led from the courtroom.