Ray Kinsella (Kevin Costner) is a novice farmer who lives in rural Iowa with his wife, Annie (Amy Madigan), and their young daughter Karin (Gaby Hoffmann). Ray's deceased father, John Kinsella (Dwier Brown) loved baseball, the Chicago White Sox, and Shoeless Joe Jackson (Ray Liotta), who was banned from baseball for his part in throwing the 1919 World Series during the so-called 1919 Black Sox scandal. His father, though, seemed "worn down" by life.
While walking through the cornfield, Ray hears a voice whisper, "If you build it, he will come." He imagines a baseball field in his cornfield. Annie is skeptical but she tells him to follow his vision. He works on the field for the next couple of days, hoping to find out what will happen. Neighbors stop along the road to watch and heckle as he plows under the corn. He waits all year to see whatever happens. Nothing happens, leaving a dejected Ray. One night the next summer, several deceased ballplayers from the 1919 team begin practicing and playing on the field. Soon after, Ray is told by his brother-in-law that unless he gets rid of the baseball field and returns it to farmland, he will go bankrupt.
Ray hears the voice again, which prompts him to contact 1960s author Terence Mann (James Earl Jones), who had once written about the golden days of baseball. He wrote that as a child he dreamed of playing for the Dodgers on Ebbets Field. He goes to Boston to find Terence and bring him to a Red Sox game, which he envisioned in a dream one night. At the game, Ray sees a message on the scoreboard telling him to find a 1920s ballplayer named Archibald "Moonlight" Graham.
Ray and Terence travel to Chisholm, Minnesota, Moonlight's hometown, to find him. The first place they check is the office of the local paper, but one of the researchers there tells them that Moonlight Graham been dead since 1972. A confused Terence and Ray return to their motel room, wondering how to find Moonlight. Ray decides to go out for a walk. During the walk, he discovers that he has somehow been magically transported back in time to 1972. He quickly finds the elderly Moonlight Graham (Burt Lancaster) in the streets, who has been working as a doctor since his brief time in the major leagues. In Graham's office, when Ray asks why he left baseball for medicine, Graham answers that he'd rather save lives as a medical doctor than scrounge through the minor leagues again. He declines Ray's invitation to fulfill his dream.
When Ray comes back to the real world the next morning, he and Terence return to Iowa. On their way, they pick up a young hitchhiker. After a brief discussion of how the man is trying to find a way to play professional baseball, the young man introduces himself as Archie Graham (Frank Whaley) - the young Moonlight. The three return to the farm, where Moonlight begins to play with the other ghosts. More baseball players have appeared in Ray's absence, and Moonlight is having a great time playing, while also being razzed by the veteran players about his youth and enthusiasm.
During an argument between Ray and his brother-in-law, who is forcing him to lease the property before it's too late, Karin falls off the bleachers. Karin appears to be not breathing. Moonlight quickly runs to help, but hesitates to leave the baseball field. He does step off the field, instantly becoming the old doctor Ray met in Chisholm. Graham recognizes that Karin is choking, and holding her steady and pounding her on the upper back, causing her to cough up the piece of hot dog that had blocked her airway. Ray realizes that Graham's decision means he cannot return to the field as his younger self, and apologizes to the doctor. Moonlight assures Ray that it's alright, and thanks him for his chance. He walks out into the ballfield toward the cornfield, the players now addressing Graham with subdued, respectful voices. Terence and Karin persuade Ray's brother-in-law that tourists will pay admission to see the magic of this field to bring back memories of the game.
At the end of the day, the players head for the cornstalks in the outfield. Just before vanishing, Shoeless Joe asks Terence if he will come with them. An angry Ray demands to know why he can't go. Terence persuades him that he has to stay behind to take care of his family. After saying goodbye, Terence walks into the cornstalks and disappears.
Shoeless Joe then tells Ray, "If you build it, HE will come", and glances toward a player near home plate in catcher's equipment. The player removes his mask, and Ray recognizes his father, John, as a young man. At his wife's urging, Ray introduces John to his granddaughter, Karin, catching himself before telling Karin who he is, and simply introducing him as "John". As his father is heading toward the outfield, to leave with the rest of the players, Ray asks his father to play catch, finally calling him "Dad", as father and son choke back tears. As they play catch, a long line of cars begin approaching the baseball field - people coming to watch the game... thus fulfilling Karin and Terrence's prophecy that people will come to watch baseball.