Demi Moore details her devastating past as told in her new memoir

The actress 56, wrote a new memoir called "Inside Out."

Legendary actress Demi Moore opened up her home in the Hollywood Hills to ABC News' Diane Sawyer to discuss her past, a devastating crossroads and how she got to where she is today.

Moore defined Hollywood in the '90s in some of the decade's biggest hits, but her fame has not come without loss and isolation. The actress went through a period of anguish nearly seven years ago when she was not speaking to her ex-husband, her three children stopped speaking to her, urging her to get help. Her weight plummeted and she collapsed at a party.

"I guess the fundamental question that came forward for me was, 'How did I get here?'" the actress said. "I mean, from where I started to what I've experienced, where I've been, like, how did I get here?"

She paused, asking herself again, "How the 'f' did I get here?"

Moore, 56, said, "I lost me."

"I think the thing, if I were to look back, I would say I blinded myself and I lost -- I lost myself," she explained.

She set out to reclaim her life, writing a memoir, "Inside Out," that takes a candid look at her relationships, struggles from her childhood, ascent to fame amid life's pitfalls and her aims to help others who may be struggling. The actress dedicated the book to her three daughters, now very much back in her life, and her troubled mother.

Moore's parents both dealt with alcoholism and constantly moved her family across the country, ahead of debt collectors and infidelities. Moore says she was 12 years old when her mother first attempted suicide.

"I remember using my fingers, the small fingers of a child, to dig the pills my mother had tried to swallow, out of her mouth," Moore wrote in the book.

Moore explained to Sawyer that her mom attempted suicide "many, many times." Looking back, Moore concluded that "life-changing moment" was the end of her childhood.

In another devastating revelation, Moore also found out the man she knew and loved as her dad was actually not her biological father. Upon finding out, she said she told herself "that I wasn't wanted, or that I don't deserve to be here."

After her father and mother divorced, Moore lived at home with her unstable mother. As a young, anxious teen, her mom would bring her along to bars so that men would take notice.

When she was 15, she wrote, she came home to an older man they knew in their apartment with a key. She said he raped her and asked how it felt "to be whored" by her mother "for $500."

"I think, in my deep heart, no. I don't think it was a straightforward transaction," she said about whether she thought her mom sold her. "But she still -- she still did give him the access and put me in harm's way."

Moore dropped out of high school as a teenager and left her mom's home to invent a future for herself. She signed up to go on acting auditions without any formal training.

"I mean, I was figuring it out, like, by the seat of my pants," Moore said. "The school of 'fake it till you make it.'"

She added that her "confidence" was more of an "I don't have anything to lose" mentality.

"I don't have anything, so why not?" she said.

Moore got her lucky break at 19 years old in "General Hospital." The actress said she knew she was in over her head and wrote in her book that she started using alcohol and then cocaine abusively.

"I don't have an off switch. I don't have the thing that says, 'This is enough,'" she said.

In 1984, Moore landed a role in "St. Elmo's Fire" and was cast as a part she knew all too well -- a reckless party girl.

"I mean, I think the irony certainly was not lost on me," she said.

But before filming, the producer and director insisted that she go to rehab, and Moore said it was "a profound gift that they gave me." Moore committed to sobriety and her pledge lasted "almost 20 years" until she was in her 40s.

Throughout the '90s, Moore took chances as an actress with strong roles.

"We made pottery super sexy, that is for sure," she laughed about the iconic scene from "Ghost."

The actress also defied studio executives of "A Few Good Men" who wanted Moore's character and Tom Cruise's character to have a romance. She said the studio executive asked, "If there wasn't gonna be a sex scene, then, you know, why was I in it?"

As her hits and success flourished, she became a producer and the highest paid actress in Hollywood with a $12.5 million salary. Some critics even gave her the nickname "Gimme Moore," and others "like that," she recalled.

But she stood strong in her accomplishments, especially as a woman.

"Why shouldn't I? Why shouldn't all women be paid equal to the quality of the work they're doing?" she said. "Just treat me the same. No better, no worse."

But Moore said she has learned even once she felt like she made it at the top, old faults can suddenly reappear. She discussed that further with Diane Sawyer in later parts of the interview that will air on "Good Morning America" on Tuesday and Wednesday.