His estranged wife, Huma Abedin, the one-time close aide to Hillary Clinton, filed for divorce the same day.
The official spoke to The Associated Press on condition of anonymity because the criminal charges had yet to be filed publicly with the court.
He resigned from the US Congress in 2011 after another sexting scandal.
Weiner agreed Friday not to appeal any sentence between 21 and 27 months in prison. His sentencing is scheduled for September 8. Federal authorities in NY and North Carolina had been investigating online communications between Weiner and a 15-year-old girl.More news: United States signs worldwide declaration on climate change despite Trump's past statements
"I have a sickness but I do not have an excuse", he told Manhattan federal Judge Loretta Preska. "I am filled with regret and heartbroken for those I have hurt", he said.
Weiner also apologized to the teenage girl. "I am committed to making amends to all those I have harmed", he said in a statement.
This is not the first time Weiner is embarrassing those around him.
"I had hit bottom", Weiner said. He said he continues to follow the treatment daily. "These destructive impulses brought great devastation to my family and friends and destroyed my life's dream in public service. And yet I remained in denial even as the world around me fell apart".More news: Arsene Wenger's future to be decided after FA Cup final
According to the charges, prosecutors said, Weiner used online messaging and video chat apps to communicate with a girl "he knew to be 15 years old".
A former US Congressman has pleaded guilty in a federal court to one count of sending obscene messages to a minor, leading to a scandal that played a role in last year's US presidential election.
The plea stems from an investigation of his 2016 text exchanges with a 15-year-old girl in North Carolina.
Weiner admitted that in 2016, he started up an online relationship with the North Carolina teen "who said she was a high school student" after she contacted him online. He faces between no jail time and ten years at sentencing, it said. The emails had apparently been forwarded to the computer or transferred there for printing or storage. On Oct. 28, former FBI Director James Comey sent a letter informing Congress that agents were reviewing the emails "to determine whether they contain classified information" relevant to a separate investigation of Clinton's use of a private email server while Secretary of State. He later said the emails were duplicates of earlier material already examined by the Federal Bureau of Investigation. He said he ended the habit, but it resurfaced in 2013, leading him to pull out of the race for NY mayor that year. His failed mayoral bid was the subject of the documentary "Weiner".More news: Vegas Play of the Day: Washington Capitals at Pittsburgh Penguins
- Wall St set to open slightly higher as oil prices jump
- Players Championship victor prepares for military duty
- Heavy bikes, yachts, private jets to attract 31 pc GST
- Google Play Award winners announced, highlighting best app and games for 2017
- Facebook signs deal with ESL to livestream esports
- Heard voices the man who hit pedestrians in Times Square
- Penguins turn to Matt Murray for Game 4 of Eastern final
- Utah Rep. Jason Chaffetz To Leave Office At The End Of June
- Trump Tells Russians That Comey Firing Relieved Pressure
- The NSA told Microsoft about EternalBlue hack used in WannaCry