More divorce drama for Patrick Dempsey.

According to In Touch Weekly, the secret behind the 49-year-old actor’s split from wife Jillian Fink and subsequent departure from Grey’s Anatomy was his “inappropriate relationship” with a young woman on the hit show’s set.

“[His co-star] Ellen Pompeo found out and was angry because she’s close friends with Jillian, so of course, she told her,” an insider said.

grey's anatomy

Patrick and Ellen on Grey’s Anatomy in May 2014.

When Grey’s creator and executive producer Shonda Rhimes learned of Patrick’s affair, she decided to kill off his character, Derek Shepherd, the source explained. “Shonda fired Patrick. He didn’t want to leave, [but] Shonda has no patience for that kind of behavior,” the insider said.

RELATED: Patrick Dempsey Selling Mansion He Shared With Ex-Wife for $14.5 Million After Divorce

Though their characters were a couple on the hit show, the insider said “there was tension in Patrick and Ellen’s relationship for years before the final blowup” because Ellen “was sick of his behavior on and off set.”

“Patrick found out that Ellen told his wife about the relationship and totally lost it. They had a huge blowup on the set in front of everyone,” the insider revealed.

patrick dempsey wife

Patrick and Jillian in March 2011.

During the actor’s final appearance on Grey’s — which took place on the April 23 episode — Patrick’s character was left brain dead and in a coma after a gruesome car accident. It was Ellen’s character, Meredith Grey, who chose to take husband Derek off of life support at the culmination of the emotional episode. This possibly proves Shonda’s alleged allegiance to Ellen over Patrick.

Patrick and Jillian Fink announced they were separating on Jan. 23 after 15 years of marriage. The couple have three children — daughter Talula, 12, and twins Sullivan and Darby, 7 — together.