Patrick Dempsey
Patrick Dempsey will play the role of Harry Quebert in Epix’s upcoming 10-episode drama, “The Truth About the Harry Quebert Affair.” Pictured: Dempsey attends the grand opening of “Porsche auf Sylt” on April 1, 2017 in Westerland, Germany. Getty Images/Alexander Hassenstein

Patrick Dempsey just landed his first TV role since departing “Grey’s Anatomy” a couple of years back.

According to TV Line, Dempsey has signed on to appear in Epix’s drama “The Truth About the Harry Quebert Affair.” The 10-episode series is based on Joel Dicker’s novel of the same title and is centered on Harry Quebert’s journey as he is accused and indicted for murder. Years after a teenage girl’s disappearance, her body was found on Quebert’s property.

Dempsey will play the lead role in the Epix series and will bring to life Harry, who is known as a “literary icon.” “New Girl” alum Damon Wayans has been cast to play the role of Sergeant Perry Gahalowood, the investigator who will look into the teenager’s death. “Designated Survivor” alum Virginia Madsen will play a local diner who knows a thing or two about Harry.

Dempsey departed Shonda Rhimes’ hit ABC series in 2015 after playing the role of Dr. Derek Shepherd for 11 seasons. In his final moments on the show, Dr. Shepherd was killed in a car crash and was survived by his wife, Meredith Grey (Ellen Pompeo) and children.

Following his exit from “Grey’s Anatomy,” Demspey told People that he felt it was time for McDreamy to go since he’d been on the drama for a very long time. “It was time for me to move on with other things and other interests. I probably should have moved a couple of years earlier. I stayed a bit longer than I should have. I think after a certain period of time, no matter how much money you make, you want to control out of your own schedule,” he said.

Dempsey also shared that when he told executive producer Rhimes that he plans on exiting the series after Season 11, the latter did not stop him from doing what he wanted. “It was clear we were both ready,” he added.

The actor was also on board with Rhimes’ decision to kill off his character instead of just letting him pursue a different career. “I thought it was really interesting. It definitely woke people up. And it was beautifully symbolic in many ways,” he said.