The actress and “Transformers” star is getting personal in a new book of poems.

Actress Megan Fox is opening up for the first time about pregnancy loss in her new book of poems, “Pretty Boys Are Poisonous,” released Tuesday by publisher Gallery Books.

In the last two poems of the book, Fox describes the heartbreaking pregnancy loss she said she and musician Colson Baker, more commonly known as Machine Gun Kelly, endured together.

“I had never been through anything like that before in my life,” Fox told ABC News’ Kayna Whitworth. “I have three kids. So, it was very difficult for both of us. And it sent us on a very wild journey together and separately, and together and apart, and together and apart, and together and apart, trying to navigate, ‘What does this mean? And why did this happen?'”

PHOTO: Megan Fox and Machine Gun Kelly attend the 65th GRAMMY Awards on Feb. 5, 2023 in Los Angeles.

Megan Fox and Machine Gun Kelly attend the 65th GRAMMY Awards on Feb. 5, 2023 in Los Angeles.
Lester Cohen/Getty Images, FILE

Fox’s new book is also full of other personal revelations centering around themes of emotional, mental and physical abuse. The actress and mom writes about her rocky and sometimes strained relationships with other men as well, including in one poem titled “Oxycodone and Tequila.”

“I just think it was something inside of me that had to come out because it was gonna make me sick,” Fox said.

PHOTO: Megan Fox speaks to ABC News' Kayna Whitworth on "Good Morning America," which aired on Nov. 7, 2023.

Megan Fox speaks to ABC News’ Kayna Whitworth on “Good Morning America,” which aired on Nov. 7, 2023.
ABC News

“This is not an exposé that I wrote or a memoir,” she added. “But throughout my life, I have been in at least one physically abusive relationship and several psychologically very abusive relationships. I’ve only been publicly connected to a few people, but I shared energy with, I guess we could say, [some] who were horrific people and also very famous, very famous people. But no one knows that I was involved with those people.”

The “Transformers” actor said of the more than 70 poems featured in “Pretty Boys Are Poisonous,” the one of which she is most proud is “To Marry an Arsonist”, which features the line: “True love, twin flame, trusted friend, naive girl. so many secrets hiding behind your scorched-earth temper.”

PHOTO: Megan Fox's new poetry book, "Pretty Boys are Poisonous."

Megan Fox’s new poetry book, “Pretty Boys are Poisonous.”
Simon & Schuster

Fox said she wanted to write her new book of poems to let other women know they don’t have to stay silent about their past or their pain.

“It gives an elegant place for your pain to live — to put it into art makes it useful to other people. And so, you don’t just suffer with it on your own,” Fox said.