The Spider-Man actress will join Michael Shannon and Joel Edgerton in Warner Bros' sci-fi movie, reports Deadline.
Mud director Jeff Nichols's film centres around a father and his 8-year-old son, who go on the run when the boy is revealed to have special powers.
Nichols, who also wrote the script, has previously compared the movie to John Carpenter's 1984 film Starman.
Dunst was most recently seen in Upside Down and On the Road. She will next appear in thriller The Two Faces of January.
Midnight Special is yet to announce a release date.
Watch Kirsten Dunst discuss On the Road with Digital Spy below: