Legendary Entertainment has won the movie rights to Grady Hendrix’s runaway bestseller “How to Sell a Haunted House.”

The studio behind “Dune” took the novel over several bids. The book received critical acclaim and an instant following thanks to its dynamic storytelling — pulling off genuine fright with its evil puppet antagonist, and a deeply emotional story about the horrors of family.

New Zealand-based Māori filmmaker James Ashcroft is attached to direct the project. Ashcroft made his mark in the indie genre space with the bleak “Coming Home in the Dark,” which premiered at the 2021 Sundance Film Festival and was later acquired by Netflix. Hendrix will adapt his own novel for the screen.

“Hendrix has created a wholly original creature in Pupkin, one as iconic as Chuckie or Pennywise,” wrote The New York Times in its January review. “Pupkin represents the losses of growing up. He’s the vehicle of an unfulfilled mother’s pain, her regrets and loneliness. He’s childhood trauma incarnate, delivered from one generation to the next.”

Sam Raimi and Rob Tapert’s Ghost House Pictures will produce the film with Hendrix and Adam Goldworm’s Aperture Entertainment. Romel Adam and Jose Cañas will oversee for Ghost House. Aperture assembled the package.

Hendrix is also the author of the bestselling “My Best Friend’s Exorcism,” which was recently adapted into the Amazon Studios film of the same name. His additional titles include “We Sold Our Souls” and “Horrorstör,” which he is also set to adapt for New Republic. His “Final Girl Support Group” is also in development at HBO Max with “The Flash” director Andy Muschietti and Charlize Theron among the producers. He is repped by Aperture, JABberwocky and Gang, Tyre, Ramer, Brown & Passman.

Ashcroft rose up through the Venice Biennale Cinema College and the Torino Film Festival’s Up and Coming Program. He also served as creative advisor for the Sundance Native Scriptwriter’s lab in 2021. He is currently developing “Devolution” at Legendary and “Whisper Man” with AGBO. Ashcroft is repped by CAA and Grandview. 

Goldworm is represented by attorney Ashley Silver at Brecheen, Feldman, Breimer, Silver and Thompson.