Jim Carrey is a much different kind of detective than Ace Ventura in the first trailer for the gritty thriller "Dark Crimes."

In his first leading role since 2014's "Dumb and Dumber To," Carrey plays a tormented cop obsessed with an unsolved murder and sex crime that bears striking similarities to a novel by celebrated author Krystov Kozlow (Marton Csokas). He begins to track Krystov and his girlfriend (Charlotte Gainsbourg), a mysterious sex club worker, and descends into an underworld of sex, lies, corruption, and shocking secrets.

Carrey's career has been quiet in recent years. He had a small supporting part in 2016's horror flick "The Bad Batch" and was the subject of last year's "Jim and Andy: The Great Beyond," a documentary that chronicled how he never broke character as Andy Kaufman while shooting "Man on the Moon." He also executive produced Showtime's "I'm Dying Up Here."

"Dark Crimes" will be released April 19 on DirecTV and then in theaters on May 11.