MacGyver hangs onto the wooden pivot platform above the pit of lava, and Merlin hangs onto him. As the slats starts to crack, MacGyver uses the corkscrew attachment on his knife to get a handhold and then pull himself up. When they get to the top, the pivot point swings from vertical to horizontal. Balancing carefully to keep it level, MacGyver tells Merlin to climb over him and get to solid ground. Merlin manages to get clear and MacGyver follows him to safety. As they recover, Merlin complains that he isn't used to having a rival and complains that MacGyver is showing him up. MacGyver tries to assure him that he has no interest in becoming the court magician and only wants to rescue Ian McIver.
In her castle up ahead, Morganna discovers that one of her guards is dozing. She awakens him and warns that if he falls asleep, she'll make sure he doesn't wake up. She goes to check on Cecelia and the girl is sure that Galahad will come to rescue her. Morganna, unimpressed, tells Cecelia that she will be the first test subject for her new weapon. She plans to use her weapon to arm the Visigoths and sweep through England and then south across Europe to the Middle East, conquering everyone in her path.
As MacGyver and Merlin make their way through the caves, Merlin drinks wine from the wineskin he carries with him. MacGyver tries to explain while alcohol doesn't actually make a person better but Merlin dismisses his claim. They get to the cave exit and find a snarling dog wearing a devil mask blocking their path. It lunges at them but it's tethered on a chain. There's no way around it but MacGyver is reluctant to have Merlin kill it with his throwing knife. Merlin agrees to take a more peaceful approach and covers his hands with sulfuric mud from one of the fumaroles. MacGyver isn't impressed by the smell, and warns that it'll simply infuriate the dog. It starts to pull its chain out of the wall and MacGyver quickly uses the tube from the king's favor to make a crude dog whistle. It breaks free just as he finds the right pitch to send it running in fear.
Morganna is carefully mixing three chemicals in her laboratory. When the dog returns and chases her other guard in, Morganna realizes that they have visitors.
Emerging from the caves, MacGyver and Merlin spot the castle across the valley. Merlin finally admits that he's not the wizard he once was and that MacGyver's magic is more powerful. MacGyver tells him that he has the magic of wisdom and that his name will go down in history as the greatest wizard of all time. His confidence restored, Merlin leads the way to the castle and picks the lock on the door. They slip inside and find Morganna's laboratory. Examining her three chemicals, MacGyver realizes that she has discovered the formula for gunpowder, hundreds of years ahead of when it's discovered according to history.
Cecilia calls for water and the two men hear her and go to investigate. Merlin uses an ancient magic to render the man unconscious: a blackjack. They free Cecilia and introduce themselves, and Cecilia realizes that MacGyver is related to Ian McIver. She says that Ian is alive and imprisoned. Morganna captured him and spread rumors to make it appear they were working together, but Cecilia won't abandon him. They find Ian, who is dying of poor health. He tells them that his son still lives and wants them to find the boy and assure him that his father refused to betray his people. MacGyver asks for the boy's name but Ian dies before he can reveal it and confirm that MacGyver is a descendent of the McIvers.
When MacGyver explains that he needs to know the name of Ian's son to confirm his ancestry, Cecilia says that Ian wrote a letter to his son on the wall using a sticky liquid. MacGyver decides to use gunpowder to burn it into the rock and reveal the letters, and Cecilia agrees to stay so that they can assure that Ian's honor is restored. When they burn out the letters, they prove initially unreadable. However, MacGyver uses Cecilia's hairpin and ammonia that Merlin carries to polish it and make a mirror. Ian wrote the letters in reverse as a code. MacGyver uses the mirror to read the words and discovers that Ian's son has the same name as MacGyver: Angus.
Morganna arrives to check on Cecilia and locks them in the cell. She turns over the hourglass and tells them that when their hour is up, she'll use them as targets for her new weapon. Once she's gone, MacGyver gives Merlin his Swiss army knife and has him use the scissors to cut a length of rope from his robe. He then takes silk and bracing quills from Cecilia's dress and starts putting them together into something new. He quickly builds a kite and attaches the rope from Merlin's robe to it, and Merlin's knife to the base of the kite.
Morganna calls in the dozing guard and assures him that he can redeem himself by acting as a test subject for her weapon. She has him stand in front of a crude gun and prepares to light it.
MacGyver takes the other end of Merlin's rope and rolls it down the hallway into a puddle of water near her workshop. He then takes Merlin's wineskin and mixes the remaining mine with zinc and vitriol from Merlin's hidden supply of chemicals. The resulting chemical reaction creates hydrogen, and MacGyver caps the wineskin to turn it into a balloon.
As Morganna kills the guard for his failure, using her newly created "gun," MacGyver fastens the balloon to the kite and releases it through the window. As it floats upward, MacGyver ties the rope to the cell door lock and tells Merlin to keep his knife as a token of friendship. The lightning from the gathering storm strikes the balloon. It bursts and the kite drifts upward. Below, MacGyver places the sample of gunpowder he took from Morganna's lab and puts it in the lock.
Morganna and her remaining guard finish loading the newly crafted guns and go upstairs to test them on Cecilia and the others. She sees the rope extending into the water and MacGyver tries to warn her, but Morganna refuses to listen. The lightning is attracted to the knife and the electricity shoots down the wet robe and ignites the gunpowder in the lock, blowing it open. Morganna prepares to shoot them and steps forward onto the wet rope. Another lightning bolt strikes the kit and the charges is conducted down the rope into Morganna. The shock knocks her back and MacGyver gets Merlin and Cecilia out while the sparks ignite a fire in her workshop. Merlin tries to get to Morganna's records but MacGyver warns that it'll soon become extremely dangerous. As they head for the exit, Morganna recovers consciousness, grabs a gun, and comes after them. She shoots at MacGyver, grazing his forehead, just as the lab explodes behind her. She dies screaming his name while MacGyver drops to the ground.
MacGyver recovers consciousness to find a modern-day paramedic checking him. The man looks a great deal like Merlin. Pete is there and for a moment the confused MacGyver wonders if he's Arthur. The broom and the bridge, who look like Galahad and Cecilia, thank MacGyver for saving the groom's life. As the paramedic applies a bandage to MacGyver's head wound and trims it, MacGyver notices that he's using the scissors on a Swiss Army knife... the one he gave Merlin. MacGyver reaches into his pocket and discovers that his Swiss Army knife is gone, but he has the favor that Arthur gave him.