Akram, Pakistan's leading wicket-taker in both Test and ODI cricket, retired in 2003 after an 18-year international career, but continued to travel the world on commentary and coaching assignments. The cocaine habit, he says, began after he retired, when he started to crave a "a substitute for the adrenaline rush of competition", and ended after the death of his first wife Huma in 2009.
Extracts from his book, published alongside an interview in The Times, paint a frank picture of Akram's slide into addiction.
"I liked to indulge myself; I liked to party," he writes. "The culture of fame in south Asia is all consuming, seductive and corrupting. You can go to ten parties a night, and some do. And it took its toll on me. My devices turned into vices.
"Worst of all, I developed a dependence on cocaine. It started innocuously enough when I was offered a line at a party in England; my use grew steadily more serious, to the point that I felt I needed it to function.
"It made me volatile. It made me deceptive. Huma, I know, was often lonely in this time . . . she would talk of her desire to move to Karachi, to be nearer her parents and siblings. I was reluctant. Why? Partly because I liked going to Karachi on my own, pretending it was work when it was actually about partying, often for days at a time.
"Huma eventually found me out, discovering a packet of cocaine in my wallet . . . 'You need help.' I agreed. It was getting out of hand. I couldn't control it. One line would become two, two would become four; four would become a gram, a gram would become two. I could not sleep. I could not eat. I grew inattentive to my diabetes, which caused me headaches and mood swings. Like a lot of addicts, part of me welcomed discovery: the secrecy had been exhausting."
Akram went into rehab, finding the experience distressing - "The doctor was a complete con man, who worked primarily on manipulating families rather than treating patients, on separating relatives from money rather than users from drugs" - and ended up relapsing.
"Try as I might, part of me was still smouldering inside about the indignity of what I'd been put through. My pride was hurt, and the lure of my lifestyle remained. I briefly contemplated divorce. I settled for heading to the 2009 ICC Champions Trophy where, out from under Huma's daily scrutiny, I started using again."
"Huma's last selfless, unconscious act was curing me of my drug problem. That way of life was over, and I have never looked back."
Akram has since remarried, and has three children - two sons from his first marriage and a daughter from his second. In his interview with The Times, he said he had written his book for his children.
"I'm a bit anxious about the book," he said, "but I think once it is out, I'll be kind of over it. I'm anxious because at my age, I'm 56 and I've been diabetic for 25 years, it is just stress, you know . . . it was tough to revisit all the things. I've done it for my two boys, who are 25 and 21, and my seven-year-old daughter, just to put my side of the story."