MacGyver and Merlin dangle over the lava pit and MacGyver uses the corkscrew on his Swiss Army knife to get a handhold and start pulling himself up. He tells Merlin to grab hold and help pull them both up. Working together, they get high enough for the pivot platform to swing to the horizontal. Merlin crawls off first while MacGyver keeps it balanced, and then MacGyver manages to crawl clear. Merlin complains that MacGyver is grabbing all the attention and he can't handle having a rival, and MacGyver insists that he doesn't want Merlin's job and is only there to save his ancestor.
In Morganna's castle, the queen finds a dozing guard and warns him that if he fully goes to sleep, she'll kill him. She then has the guard let her into Cecilia's cell. The girl is sure that Galahad will come for her but Morganna informs her that she'll be the first test for her glorious war machine.
MacGyver and Merlin make their way through the cave system as Merlin drinks wine from his flask. MacGyver advises against it and tries to explain the science but Merlin isn't impressed.
Morganna discusses her plan to arm the Visigoths with her killing machines so that she can conquer first England and then Rome and finally the Middle East.
Merlin and MacGyver approach the exit when a rock falls and the wizard hastily drops back. MacGyver assures him that he doesn't think he's a coward. A savage dog wearing a devil mask runs at them to the length of its tether. Merlin tries his flash powder without success and prepares to throw a knife. MacGyver asks him not to and Merlin agrees, and then covers his hands with sulfuric mud from a nearby fumarole. MacGyver doesn't believe the stench will drive the dog off, and the tether is coming loose. He uses the tube from the king's amulet and uses his knife to cut notches in it. He then blows the makeshift whistle, giving off a high-pitched knife that drives the dog off just as it breaks free.
Morganna is mixing three chemicals very carefully in 20 to 7 to 1 proportions. One of the guards runs in chased by the dog, Zeus. Morganna sends the guard to feed Zeus and realizes they have unexpected guests.
MacGyver and Merlin find the castle and Merlin warns that he's not the magician he once was. Since MacGyver has demonstrated his knowledge, he's realized that he's a used up sorcerer. MacGyver says he has faith in him thanks to the magic of wisdom, and assures him he'll go down in history as the greatest wizard of all time. Bolstered, they go to the castle door and Merlin picks the lock. He lets MacGyver go first and they slip through the castle passageways to Morganna's laboratory. MacGyver realizes that she's discovered gunpowder hundreds of years early.
As they explore the lab, Merlin and MacGyver hear Cecilia in the dungeons as she calls to the guard for water. They go to find her and discover the sleeping guard. Merlin explains he has an ancient potion, easy to administer, that will put the man to sleep. The wizard walks up to the man and clubs him unconscious. They free Cecilia and when she hears MacGyver's name, says she can't leave. Ian McIver kept him alive and she refuses to abandon him. Morganna stole his lands and spread the rumors he was working with her. They free the dying Ian, who tells him that his son still lives and wants them to assure the boy that he didn't betray his people. Ian dies before he can speak the boy's name and confirm if he's MacGyver's ancestor.
MacGyver explains that his first name is rumored to be the same of Ian's but now he'll never know. Cecilia explains that Ian tried to write a letter on the wall using a sticky liquid. MacGyver says he can burn it out with gunpowder and Cecilia insists that they learn the name of Ian's son so they can save him from his father's shame. MacGyver agrees but warns it will take time. Merlin reluctantly agrees and MacGyver proceeds. The lettering burns out but they can't read the letters. MacGyver uses Cecilia's silver hairpiece and some ammonia from Merlin's cloak to make a mirror: Ian wrote the letters in reverse as a code. Using the mirrored surface, MacGyver reads the lettering that is addressed to Ian's son... Angus, the same as MacGyver's.
Morganna arrives and locks them in Ian's cell. She turns over an hourglass and tells them that when the sand runs out, she'll use them as targets. Once she's gone, MacGyver has Merlin cut his robe into a single length of rope using the scissors attachment on his Swiss Army knife. He takes quills from Cecilia's dress and the silk and starts putting something together.
Morganna tests her new gun, narrowly avoiding her guard.
MacGyver builds a crude kite out of the quills and silk and fastens Merlin's robe to it.
The guard tries to excuse his failure and Morganna offers to let him redeem herself by participating in her experiment.
MacGyver soaks Merlin's robe in water and then rolls it down the hallway into Morganna's laboratory. She fails to notice it as she tells the guard to pick out a bullet from a dish.
MacGyver takes Merlin's wine flask with the last of his wine and then mixes zinc with vitriol to create hydrogen. He caps the vial with the flask to make a balloon.
Morganna places the guard in front of her new gun.
MacGyver releases the crude balloon to lift the kite up to the window. It catches a breeze and slips outside. MacGyver ties off the rope to the lock while Merlin offers MacGyver offers his knife back. MacGyver lets him keep it as a token of friendship and Merlin says that he's honored.
Morganna ignites the gun and kills her guard.
The lightning from the storm strikes the balloon, bursting it and freeing the kite. MacGyver takes what's left of the gunpowder he took from the lab and puts it in the lock, attached to the robe.
Morganna has her other guard load the guns and she goes upstairs to the cell to test them on the prisoners. She notices the robe and MacGyver warns her she's standing in a dangerous spot. She refuses to run and prepares to shoot him. The lightning strikes the metal knife, goes down the robe, breaks open the lock, and sets the lab on fire. She grabs her gun and prepares to shoot MacGyver, but steps on the robe and another lightning bolt electrocutes her. They quickly escape, although MacGyver warns Merlin away when he tries to go back for the knowledge. Morganna staggers downstairs and shoots at MacGyver, grazing his forehead before the laboratory explodes, killing her. MacGyver collapses to the ground as Merlin and Cecilia run to his side.
MacGyver wakes up to find a paramedic who looks a lot like Merlin examining him. He sees Pete and initially mistakes him for Arthur. The groom that MacGyver saved, who looks like Galahad, thanks him and his new bride kisses him in thanks... a bride who looks like Cecilia. As the paramedic trims MacGyver's bandage, MacGyver notices that he's using a Swiss Army knife with a scissors attachment just like the one he gave Merlin. He reaches in his pocket and finds the king's favor that Arthur gave him.