Meghan Markle ended her two-year marriage to Hollywood producer Trevor Engelson “totally out of the blue” and the then-husband felt that he was “a piece of something stuck to the bottom of her shoe,” a new book written by Princess Diana’s biographer claimed.

The details about Markle — who is set to marry Prince Harry on May 19 — will be released in “Meghan, A Hollywood Princess” by Andrew Morton. In an excerpt published by The Sunday Times, Morton writes Markle and Engelson met at a dive bar in West Hollywood, Calif. Markle was attempting to get her acting career moving by going to auditions, nabbing a part as a suitcase model in “Deal or No Deal” and taking a side job as a hostess in Beverly Hills for extra money.

MEGHAN MARKLE'S EX-HUSBAND TREVOR ENGELSON: WHO IS HE?

By 2011, Markle had landed her “Suits” role and was engaged to Engelson.

“Meg was on her way up,” Tom Jr., Markle’s half-brother, was quoted saying in the book.

The show, however, filmed in New York and then in Canada. The couple was determined to make it work, even if it meant seeing each other every two or three weeks, according to the book. The couple married in Jamaica.

“It was such a moving wedding,” a bridesmaid said, according to the excerpt. “I started crying the moment I saw her in her dress.”

But the couple began to fall apart shortly after, according to Morton. Markle’s career was taking off while Engelson’s was “treading water.” Markle announced their two-year marriage was over the summer of 2013, which shocked friends and was “totally out of the blue” for Engelson, the book claims. The couple was officially divorced a year later.

“Trevor went from cherishing Meghan to, as one friend observed, ‘feeling like he was a piece of something stuck to the bottom of her shoe.’” Morton writes. “A wealthy entrepreneur friend claimed the marriage ended so abruptly that Meghan sent her wedding and engagement rings back to Trevor by registered post.”

MEGHAN MARKLE AND PRINCE HARRY'S ROYAL WEDDING: EVERYTHING YOU NEED TO KNOW

Morton’s tell-all book, to be released on April 17, also describes how Markle was affected by her parents’ divorce and her life in school.

Markle and Harry will tie the knot at St. George’s Chapel in Windsor Castle. Kensington Palace announced last week the wedding invitations have been sent out to some 600 guests. Other details, including the florists, were also released ahead of the royal wedding.