President Dakru of the African country of Kimbala is on a goodwill tour of the U.S. and to promote a trade agreement his vice president, Edward Mantu, is in Los Angeles waiting with MacGyver and the press, and worried that Pete isnâ€™t there yet. As Dakru arrives by helicopter, Pete finally arrives and apologizes. As the helicopter lands, Pete says that he took the weekend off to go fishing and relax after making all the preparations for Dakruâ€™s visit.
Dakru arrives and the State Department representative, Hendrix, greets him and introduces him to Pete and MacGyver. Dakru is there in part for a ceremony to present medals to two Americans who helped his country during a drought: MacGyver and Jack Dalton. Once Dakru has moved on, MacGyver admits he doesnâ€™t want to attend a ceremony but Hendrix insists.
Jack is walking down a hallway as a woman calls to him. He passes through a set of double doors and finds a table with his name on it in gold. Next to his name card is a platter with a gun on it. Jack sees a figure on the podium, holding a gold star. He hears the words â€œFrom the bottom of my heart, I salute you," and shoots the figureâ€¦
â€¦and wakes up at an amusement park at night, barefooted. A policeman finds him and demands to know who he is. Both men are unaware that Tabur, Mantuâ€™s assistant, is watching them from the shadows. Jack calls in MacGyver to identify him. As they go back to MacGyverâ€™s houseboat, Tabur gets there first and plants a bug, and then gets out the back door as they arrive. MacGyver wonders where Jack has been and his friend admits heâ€™s been out with a beautiful woman for the last couple of days. However, he never learned her name. Jack asks MacGyver to let him stay upstairs and keep an eye out so he doesnâ€™t go sleepwalking again and MacGyver agrees.
Tabur calls Mantu and his wife Edith that Jack managed to escape from him at the amusement park. They tell him to keep an eye on MacGyver and Mantu worries that MacGyver could uncover their plan. Edith is confident that theyâ€™ll succeed and that Mantu will be the new President of Kimbala within 24 hours.
In the morning, Jack finds himself back in the hallway with the woman calling to him. He enters the dining room and sees a coffin. MacGyver is looking at the person within and Jack wonders who it is. His friend informs him that Jack killed the person and steps aside, revealing Pete in the coffin. Pete opens his eyes and reaches for Jackâ€¦
Jack wakes up and discovers heâ€™s sleepwalking again, standing over MacGyver. MacGyver offers to make him breakfast and picks up a pitcher with a gold star on it. Jack realizes that heâ€™s holding a gun, points it at MacGyver and the pitcher, and shootsâ€¦
Jack wakes up from a cold sweat to discover that heâ€™s walked downstairs in his sleep and is holding an imaginary gun. He wakes MacGyver up and admits that heâ€™s afraid heâ€™s going insane.
Tabur listens in as MacGyver makes an appointment for Jack with Dr. Beatty at the Foundation. The African calls Edith and tells him whatâ€™s going on, and she informs Mantu. Mantu worries that the Foundation could uncover their plan but Edith assures him that even if they do, she has another puppet in place.
As Jack leaves for his appointment, he notices two fishermen talking. One of them casually says â€œfrom the bottom of my heartâ€ and Jack goes into a trance, putting a bucket of water on his head. MacGyver comes to his aid and gets him into dry clothes, and then takes him to the Foundation. Dr. Beatty puts Jack into a hypnotic trance and he describes his dream, including the fact he thinks the dining room is â€œin the moon.â€ Once she ends the trance, Beatty asks what Jack has been doing for the last few days. He describes his weekend with the mystery woman in the exact same words he said to MacGyver the previous day. She warns MacGyver that Jack has been brainwashed, but without the trigger phrase she canâ€™t immediately undo the programming or determine what Jack is programmed to do.
MacGyver and Jack go to the building for the reception and Jack realizes that the hallway is the same one from his dream. They go through the metal detector and meet with Hendrix and Pete. Mantu arrives and introduces himself, and asks to talk to Jack privately to help prepare the Presidentâ€™s speech. Using the trigger phrase, Mantu gets Jack into a private room where Edith and Tabur are there.
As Hendrix reviews the protocols for the ceremony, MacGyver notices Jackâ€™s name written in gold ink on a seating card. He also finds an empty holder fastened to the underside of the table. He goes to find Pete and warn him that someone is brainwashing Jack into assassinating Dakru.
In the private room, Edith gives Jack the trigger phrase and programs with new orders: heâ€™s to kill MacGyver.
MacGyver tries to find Jack without success. He returns and takes Pete to the table, but the holster has disappeared. Pete confirms that only himself, Hendrix, and the security staff have been in the room and nobody else could have gotten the gun out. They figure that Jackâ€™s programmers know that they know whatâ€™s going on and wonder if Hendrix is working with them. Pete stays to keep an eye out for Jack while MacGyver goes to find Jack.
Mantu comes back to the room with the holster, saying that their second puppet got it out without anyone noticing. Edith assures him that she has everything covered and that with Dakru assassinated, the American/Kimbala alliance will shatter and Mantu can become President with the help of their new allies.
MacGyver fails to find Jack and goes to the houseboat. Pete calls to tell him that they have an hour until the banquet starts and that Jack might be at the amusement park. MacGyver goes there and sees a funhouse with a moon decoration. Remembering Jackâ€™s description of his dream, MacGyver goes inside and Jack, hypnotized, hears him and turns on the machinery. MacGyver falls through a trap door and into a mirror maze. Exploring, he finds a hallway like the one at the reception building, which leads to a mock dining room. The table with the seating card is there as well. Fastened to the tableâ€™s underside is a holster and a dummy dressed as Dakru is on the podium holding a large golden star. Finally, he finds a tape player with the trigger phrase recorded on it.
Jack comes into the room and shoots at his friend. MacGyver hides behind the podium and tries to use the trigger phrase. Jack seems to respond but when MacGyver emerges from hiding, he shoots him in the shoulder, and MacGyver realizes Jackâ€™s programmers have changed the trigger phrase. MacGyver turns on the tape player to distract Jack and runs out into the mirror maze. Jack goes after him and MacGyver lets himself be seen in the mirror reflections. He taunts Jack to shoot him and Jack fires repeatedly, shattering the mirrors. With each attempt to kill his friend, Jack gets more and more stressed until finally he breaks his programming. MacGyver shows Jack the mock dining room and they see two chairs. Realizing that thereâ€™s a second brainwashed killer, MacGyver remembers that Pete described his weekend in the same glowing terms that Jack did.
At the reception, Hendrix is nervous when Jack and MacGyver donâ€™t arrive. Mantu assures her that he has a second speech for the President, and asks Pete to accept the medals on the missing heroesâ€™ behalf. Dakru goes to the podium starts to speak, taking out the medal which has a gold star. Jack and MacGyver, knocking Tabur out when he tries to stop them. They enter the dining room just as Dakru recites the new trigger phrase. Pete takes out a gun and prepares to shoot Dakru. Thinking quickly, MacGyver grabs the medal and throws it to Edith. When Pete turns to shoot her, Edith gives him the trigger phrase to stop him from shooting herâ€¦ and implicating herself.
Later, Jack and Pete undergo deprogramming at the Foundation, and MacGyver presents to be in a trance of his own as a prank.