“I knew this was as morally wrong as it was unlawful,” he said.

In his letter to the judge last week, Mr. Weiner said his regret for his crime was "profound,” and that he had “endangered the well-being of a 15-year-old girl who reached out to me on the internet.”

He also wrote that his “continued acting out over years crushed the aspirations” of his wife, Huma Abedin, “and ruined our marriage.” (She has filed for divorce.) Their young son, he wrote, would “forever have to answer questions about the public and private failings of his father.”

Mr. Weiner’s lawyers, Arlo Devlin-Brown and Erin Monju, had also raised questions about the motivation and credibility of the victim, whose story was first told in a DailyMail.com expose in September 2016 for which she was paid $30,000, they wrote.

The lawyers asserted that the girl had been looking for material for a book, which she was now “shopping to publishers,” and that she had also hoped to influence the presidential election.

The prosecutors, in their memo on Wednesday, noted that Mr. Weiner was not blaming the victim or disclaiming responsibility for his crime. But, the government said, “Weiner should be sentenced for what he did — not what motivated” the victim.

“Weiner, a grown man, a father, and a former lawmaker, willfully and knowingly asked a 15-year-old girl to display her body and engage in sexually explicit conduct for him online,” the prosecutors said. “Such conduct warrants a meaningful sentence of incarceration.”

Mr. Devlin-Brown declined to comment on the government request.

It was after publication of the DailyMail.com story that reports surfaced of an investigation into Mr. Weiner’s lewd communications with the teenager. The F.B.I., during that inquiry, seized Mr. Weiner’s laptop and found emails belonging to Ms. Abedin, a top aide to Mrs. Clinton.

That discovery led to the announcement in late October by James B. Comey, then the F.B.I. director, that the bureau had begun a new inquiry into Mrs. Clinton’s handling of official email, an investigation that ended two days before the election. Mrs. Clinton has blamed Mr. Comey in part for her loss to President Trump.