From now on, he'll also be a registered sex offender.
Weiner, who could go to prison, pleaded guilty to a single count of transmitting obscene material to a minor. Weiner, who was 51 at the time of the scandal, exchanged texts of a sexual nature with a 15-year-old girl, who lived in North Carolina.
Weiner comes in second in a bid for the Democratic nomination for mayor of New York City.
The charge carries a potential sentence of up to 10 years in prison, but could involve no jail time depending on the determination of a judge.
Weiner admitted to sharing explicit images with the 15-year-old and encouraging her to engage in sexually explicit conduct; he said he knew his behavior was "as morally wrong as it was unlawful".
The investigation led FBI agents to seize his laptop computer, which led to the discovery of a new cache of emails that Clinton had sent to Abedin. "I entered intensive treatment, found the courage to take a moral inventory of my defects, and began a program of recovery and mental health treatment that I continue to follow every day".
Weiner was already in federal custody ahead of the court hearing, which was scheduled for 11 a.m.
Weiner declined to speak to reporters as he left the courthouse.More news: Macron wins French presidency but hurdles remain in campaign to govern
"I accept full responsibility for my conduct", he said. Shortly after they emerge, Weiner admits he had engaged in sexual chats online after he resigned from Congress. Abedin appeared alongside Weiner to say that she would be sticking by him and had forgiven him.
The investigation into his exchanges with the teenage girl also roiled the 2016 USA presidential campaign days before Election Day.
Law enforcement officials say a man accused of steering his auto onto one of the busiest sidewalks in the US and mowing down pedestrians for three blocks told police he was "hearing voices".
A representative with the US attorney's office declined to comment, but the office issued an advisory Friday morning saying that it planned a news release "on the proceeding of interest in USA v. Anthony Weiner".
That inquiry was brief. Many Clinton supporters have blamed former FBI Director James Comey reopening the investigation for the Democratic candidate's loss to #DonaldTrump.
Weiner, who lives in Manhattan and represented NY in Congress from 1999 to 2011, resigned after revelations that he was sending sexually explicit messages to multiple women.
Weiner also claimed at the time that he was "likely" the subject of a hoax.
DAHLGREN: In 2013, he ran for mayor of NY until he was caught sexting again.