State District Judge John B. Board also fined Leaf $20,000, who pleaded guilty to seven counts of obtaining a controlled substance by fraud and one count of delivery of a simulated controlled substance.
His mother sat behind him in the Amarillo courtroom during sentencing.
Leaf, speaking to reporters after the hearing, said "deep in my heart I knew I had a problem" -- even as he continued to use prescription pain medication.
"I convinced myself it wasn't a big deal because these weren't illegal drugs," he said, reading from a statement. "But I did have a problem. It finally hit me square in the face in West Texas; I finally had to look squarely in the mirror."
After resigning from West Texas A&M where he coached quarterbacks, Leaf said he spent 42 days in an inpatient treatment center in Vancouver, B.C., before doing two months of outpatient care. He said he has been clean for 17 months.
Randall County District Attorney James Farren said after the deal was finalized that Leaf's addiction was flagrant and that everyone on the West Texas A&M football team knew about it.
Leaf used his players to obtain more pain killers, Farren said.
"Everyone knew if you got injured you'd get a visit from Ryan Leaf," he said. "And when he left he had half their pain medication."
Leaf, who had been living in Canada, was a star at Washington State but a bust during his four-year NFL career.
He is now living in Great Falls, Mont., where his probation will be transferred.
Leaf said his addiction started in March 2008 but that he had used painkillers before that after surgeries on his shoulders, knees and wrist.
"You just don't ever realize it until it becomes a psychological thing that takes hold of you," Leaf said. "It's such an issue in this country and people don't understand it. If I have to be the one to put a face on it I am more than happy to do it. I'll do whatever I can."