Ra (Jaye Davidson) is actually a dying alien that roamed the galaxy looking for a new body. It came across the planet Earth, and decided to possess the body of a young Egyptian boy (Dax Biagas), and Ra has been using that form ever since. The descendants of the ancient Egyptians were brought to their current home planet from Earth because the Earth slaves revolted against Ra.
The stargate that allowed Ra to transport the slaves is eventually found in the early 20th century by archeologists led by the father of Catherine Langford (Viveca Lindfors) when she was a young girl. In present day, she tracks down Dr. Daniel Jackson (James Spader) who helps decipher the codes on the stargate.
Eventually, the Air Force becomes involved, with Col. O’Neil (Kurt Russell) leading a team of Air Force recon through the portal that is created when all of the stargate symbols line up. They bring a nuclear bomb with them in case they need to destroy the stargate on the other side. Jackson also goes with them since he would be able to line up the symbols on the stargate on the other side for them to get back to Earth. The team enters the stargate and end up on the planet ruled by the alien/god Ra.
Jackson is able to learn the native language and tells the people that they are being used as slaves. This motivates the inhabitants to revolt against Ra, just as their ancestors did on Earth thousands of years ago. Ra eventually realizes that he cannot defeat the slaves, and attempts to take off from the planet in his huge pyramid-shaped spacecraft. Before Ra can get far, Jackson and O’Neil transport the nuclear bomb to Ra’s ship. The bomb goes off, destroying Ra and the ship. The natives rejoice in their new-found freedom.
Jackson completes the deciphering of the stargate and it is open again for the group to return to Earth. The survivors of the Air Force team head back through the portal. Jackson decides to stay, because he has fallen in love with Sha'uri (Mili Avital), one of the planet natives.