Jolie's aunt Debbie Martin reportedly died of the disease and both the actress's grandmother Lois and great-grandmother Virginia Gouwens died of ovarian cancer.
The details of Jolie's script were revealed in a biography of the star by Diana writer Andrew Morton.
"It was a harrowing read, it was really, really sad," a source told The Mirror.
"It is so similar to Angelina's own story, although when she wrote it she would have had absolutely no idea.
"It's like she based the character on herself ... only she couldn't possibly have done," the source added.
Last week the 39-year-old actress revealed she had undergone further preventative surgery in which she had her ovaries and fallopian tubes removed due to the 50 per cent risk of ovarian cancer.
"Last week, I had the procedure: a laparoscopic bilateral salpingo-oophorectomy. There was a small benign tumor on one ovary, but no signs of cancer in any of the tissues," she wrote in the New York Times.
"It is a less complex surgery than the mastectomy, but its effects are more severe."
"It puts a woman into forced menopause. So I was readying myself physically and emotionally, discussing options with doctors, researching alternative medicine, and mapping my hormones for estrogen or progesterone replacement. But I felt I still had months to make the date."
She went on to say, "I feel feminine, and grounded in the choices I am making for myself and my family. I know my children will never have to say, 'Mom died of ovarian cancer.'"
The operation triggered Jolie to start the menopause early and means that she can no longer have children naturally.
Although the procedure does not completely eliminate the risk of the cancer, it has significantly reduced her chances.
Her decision for preventative surgery has raised awareness of the illness which has been dubbed the "Angelina Effect".
She added in her piece, "It is not easy to make these decisions. But it is possible to take control and tackle head-on any health issue. You can seek advice, learn about the options and make choices that are right for you. Knowledge is power."
- Independent