It’s been 20 years since Jonathan Lethem published “Motherless Brooklyn,” and Edward Norton has been trying to make the novel into a movie for almost as long. Recasting from a modern-day setting into the 1950s and crafting a largely different plot, Norton still captures the spirit of the book’s unusual narrator and its love for the borough, in a gorgeously shot retro New York.

Gumshoe narrator Lionel Essrog (Norton, who also directs) has Tourette’s syndrome, which for him causes startling verbal outbursts and the compulsion to touch things — and, more inconveniently, people — repetitively. The plot’s set in motion when his boss, Frank Minna (Bruce Willis, not really trying his hardest) is murdered, leading the private eye to the office of Moses Randolph (Alec Baldwin, in real estate blowhard mode) — a thinly veiled stand-in for Robert Moses, the mid-20th century “master builder” with a knack for disenfranchisement of minorities and the poor.

Norton’s got a great cast: Willem Dafoe as Randolph’s brother, Gugu Mbatha-Raw as a crusading lawyer, Cherry Jones as a community organizer and Bobby Cannavale as another of Minna’s employees. One of the film’s best scenes sees Essrog at a jazz club, where a musician’s (Michael K. Williams) trumpet stylings perfectly match the jumpy rhythms in the detective’s mind.

Norton does a humanizing job of explaining Lionel’s unusual brain (he’s got a near-perfect memory) and defusing his outbursts with self-deprecation and humor. He also digs into the Moses scandal with an eye toward modern parallels. I’d love to see more Essrog adventures — though I’d also love to see them, in retro fashion, run under two hours.