What is the name of movie that Johnny Depp plays a detective and set in time Jack Ripper?
The movie you're thinking of is called "From Hell" (2001).
Johnny Depp plays Inspector Abberline, a detective investigating the Jack the Ripper murders in Whitechapel, London. The film is based on the graphic novel of the same name by Alan Moore and Eddie Campbell.