Khan said in Monday's Mumbai Mirror newspaper that he had no choice but to give up smoking, but the process has been hard.
One of India's top actors, Khan spent a week in the intensive care unit of a Mumbai hospital where he was admitted for chest pains in February. He promptly quit smoking on doctors' advise and reports that the first three weeks were tough.
"But the real ordeal starts now. When I'm in a bar watching friends smoke, the urge is bound to hit me," he told the newspaper. "Either I quit or I fall ill again. I almost had a heart attack because of my smoking."
Khan hails from a well-known Indian family. Khan's father is former Indian cricket captain Mansur Ali Khan Pataudi and his mother is actress Sharmila Tagore, who was a big star in the 70s. His sister Soha Ali Khan is also a Bollywood actress.
He has had a recent run of hits in "Omkara," an Indian adaptation of Shakespeare's "Othello," "Parineeta" (The Wife), "Hum Tum" (Me and You), "Salaam Namaste" (Hello, Hello) and "Dil Chahta Hai" (What the Heart Wants).