Madonna revealed that her first few years in New York City were terrifying.

The 55-year-old opened up about her experiences in a candid letter featured in the November issue of Harper's Bazaar. The Michigan native arrived in the Big Apple in 1978 to become what she called a "real artist" but she faced many struggles.

"The first year, I was held up at gunpoint. Raped on the roof of a building I was dragged up to with a knife in my back, and had my apartment broken into three times," she wrote.

PHOTOS: Madonna Debuts A Set Of Grills

The Like A Virgin singer also explained how discouraging those first several years were for her.

"It was hard and it was lonely, and I had to dare myself every day to keep going. Sometimes I would play the victim and cry in my shoe box of a bedroom with a window that faced a wall, watching the pigeons sh-- on my windowsill," she wrote. "And I wondered if it was all worth it, but then I would pull myself together and look at a postcard of Frida Kahlo taped to my wall, and the sight of her mustache consoled me."

10 Most Memorable MTV Video Music Awards Performances Ever

Despite those difficult times, Madonna managed to have a successful 30-year career that's still going strong. She also explained that she's in a much better place now. She lives in New York City along with her children, Lourdes, David, Mercy and Rocco, and has started making films. She's also used her celebrity status in a positive way and builds schools for girls in Islamic countries.

Worst Celebrity Photoshopped Magazine Disasters Ever

"I have been blessed with four amazing children. I try to teach them to think outside the box. To be daring. To choose to do things because they are the right thing to do, not because everybody else is doing them," she wrote.

Tags: Madonna