He was also sentenced to two years of supervised release once he finishes his prison term.
For the first time, Hastert, 74, admitted to Judge Thomas M. Durkin in open court that he abused an unspecified number of boys.
One of the survivors of Hastert's abuse, Scott Cross, described the fallout from his actions in court.
"As a 17-year-old boy I was devastated," said Cross, who was previously identified as individual D and is the brother of a Hastert political supporter. "I tried to figure out why Coach Hastert had singled me out. I felt terribly alone. Today I understand I did nothing to bring this on, but at age 17, I could not understand what happened or why."
A sister of one of the other victims who has since died also called on Hastert to admit his wrongdoing.
Durkin, of the Northern District of Illinois, told Hastert that he should participate in a sex offender treatment program. The judge, who spent 30 minutes criticizing the former speaker for his actions, also cautioned Hastert to refrain from communicating with his alleged victims.
"I'm deeply ashamed to be standing before you here today," Hastert said in court during his sentencing. "I know I'm here because I mistreated some of my athletes as a coach."
Hastert apologized "to my constituents and my supporters and also my colleagues I served with." He also apologized to his family and friends.
Hastert also acknowledged misleading the FBI last year when the agency was investigating the claims.
Sentencing guidelines that prosecutors asked Durkin to consider recommended anywhere from no jail time to six months. Hastert's attorneys asked that he receive only probation.
"Mr. Hastert accepts the sentence imposed by the court today," Thomas Green, an attorney for Hastert, said in a statement. "As he made clear in his own words in addressing the court, he takes sole responsibility for this tragic situation and deeply apologizes to all those affected by his actions. He hopes that he now can focus on addressing his health issues and on healing the emotional damage that has been inflicted on his family and friends who have shown unwavering support throughout this trying time."
In a statement, the U.S. Attorney's office for the Northern District of Illinois praised the "strength and bravery of the victims and witnesses who came forward" and said it was their "hope that the sentence imposed today will promote respect for the law."
Hastert pleaded guilty last fall to structuring bank transactions to avoid requirements on reporting where the money was going. Upon investigation, federal officials determined he was paying hush money to an alleged victim of sexual abuse that allegedly occurred when Hastert was a wrestling coach and teacher in Illinois.
Hastert has apologized for "misconduct" in relation to the case without explaining what wrongdoing he was referencing.
His attorneys had also filed a number of letters on his behalf, including from his wife, who pleaded with the judge to consider the "terrible toll" on the family the case has taken and Hastert's "selflessness" throughout his life.
The court also received letters from former members of Congress who spoke to his deteriorating health and "integrity."
"He is a good man that loves the Lord," wrote former House Majority Leader Tom DeLay. "He gets his integrity and values from Him. He doesn't deserve what he is going through. I ask that you consider the man that is before you and give him leniency where you can."
Prosecutors countered the letters by saying Hastert's alleged abuse should also be taken into account.
"The Court must balance the defendant's public service and the sincerity of defendant's supporters who wrote letters on his behalf against the fact that defendant enjoyed opportunities and the support of others through the years by keeping secret his sexual abuse of children, including by committing the crime for which he is being sentenced," attorneys for the government wrote.
Also this week, the primary accuser in the case, who received $1.7 million from Hastert over four years according to an FBI investigation, sued Hastert to receive the remaining $1.8 million he was promised.
The complaint identifies the victim as "James Doe," who says Hastert breached a private settlement agreement for $3.5 million in exchange for the his silence. The facts described in the complaint line up with the person identified as "Individual A" in the federal indictment.
The accuser alleges the abuse took place when he was 14 and caused a variety of psychiatric conditions.
CORRECTION: An earlier version of this story gave incomplete information about Hastert's sentence.