Williams, who has done two stints in rehab himself, is concerned for the well being of the 20-year-old.
"Miley's got the world talking and looking at her. And the spotlight that's now upon her is rehab-making. It has a detrimental effect on your psyche. I've had a similar light shine on my direction and it f***s you up - for a long time," femalefirst.co.uk quoted him as saying.
The 39-year-old star believes Miley, who shot to fame on Disney TV show “Hannah Montana”, is fighting against the showbiz industry and trying to break away from her father Billy Ray Cyrus.
He said: "She's a kid who looks as though she's rebelling against her father and rebelling against the industry that put her in a Hannah Montana-shaped box."
Photos: Katrina Kaif, Shamita Shetty at Mumbai airport
Photos: Varun Dhawan, Alia Bhatt promote 'Badri...' on 'Dil Hai Hindustani'
In pictures: 15 facts about kissing that will surprise you
Photos: Shahid Kapoor and Mira Rajput at cafe in Bandra
Photos: Deepika Padukone, Neha Dhupia and Soha Ali Khan at event