It is the first episode of Star Trek: Next Generation (production #101 and #102), written by D.C. Fontana and Gene Roddenberry, and directed by Corey Allen. It is twice the length of a normal episode, and in repeats is often shown in a re-edited two-part form.
The episode features a famous cameo appearance by DeForest Kelley as 137-year old Doctor (now Admiral) Leonard McCoy. This was the first of four eventual appearances by Original Series cast members on the series; the other three being "Unification I & II" (Leonard Nimoy), Sarek (Mark Lenard) and "Relics" (James Doohan). In a way, it was also the start of a tradition that the first episode of each new Star Trek series (set in the 24th century) include an appearance by a prominent character from a previous Star Trek series.
On Stardate 41153.7, the new starship Enterprise-D gets under way with a mission to open relations with Farpoint Station on the planet Deneb IV. The Federation wishes to negotiate use of the station's immense energy reserves as well as investigate the mystery of how the rather simple people, the Bandi, were able to construct such an advanced facility on their own. While en route, the Enterprise is stopped by a wall of energy and a powerful omnipotent being appears who identifies himself as "Q". Q condemns humans as savage beasts who have tread too far into space for his liking. Captain Jean-Luc Picard states humanity only wishes to explore the unknown, so Q decides to put them on trial to prove their worth or face extermination.
Picard turns course to flee and the energy wall becomes a fiery sphere which gives chase. Picard orders a risky at warp separation of the ship's saucer section, (which contains the living areas), from the drive section, (which contains the main weapon systems). Once the saucer is away, Picard and his bridge crew (which consists of the android Mr. Data, empathic ship's counselor Deanna Troi, security officer Tasha Yar, and helmsman Miles O'Brien) take station in the drive section's battle bridge and turn around to face off against Q. The sphere engulfs the drive section and Picard and crew (with the exception of O'Brien) are immediately transported to a brutal court room recreated from Earth's post-World War III era of the mid 21st Century. Q appears seated atop an ornate throne and announces to the jeering crowd that the crew is on trial for savagery.
Picard debates Q's accusations and suggests that he observe and judge the crew on their current mission in order to prove that humans are now a peaceful and respectable people. Intrigued with the idea, Q lets them go, but warns that they will nonetheless fail. The four officers are then returned to the battle bridge where O'Brien remains, unaware that they had ever left.
On Deneb, first Officer William Riker, chief medical officer Beverly Crusher, her young son Wesley and lieutenant Geordi La Forge, await the arrival of the Enterprise. Their host, Groppler Zorn, guides them through an unusual marketplace where requested items mysteriously appear that weren't available before. Zorn dismisses the odd occurrences but as the party moves ahead he looks to the ceiling and harshly whispers, "You have been told never to do that...". Geordi then informs that the Enterprise's drive section has arrived in orbit. Riker beams up to the ship and meets Captain Picard for the first time. Picard debriefs him about their encounter with Q and then leaves him to initiate the reconnection of the ship's saucer section.
Later, Picard, Riker, and Troi meet with Groppler Zorn who seems very reluctant to answer questions about the construction of the station's power plant. When Troi senses powerful, yet despairing emotions coming from an unknown nearby location, Zorn denies knowing anything about it. Meanwhile, Yar, La Forge, and Data conduct a search through a maze of puzzling catacombs below the station, but their findings are as mysterious as the emotions detected by the counselor.
In space, a large flying saucer-like craft, many times the size of the Enterprise, moves into orbit above the station. It scans the Enterprise, but ignores hails and begins to fire bolts of energy at the old Bandi city. Oddly, it avoids Farpoint Station entirely. Picard orders phasers to target the alien ship, but suddenly Q appears and questions Picard's actions. Down on the planet, Riker and Data rush to rescue Zorn, but witness the man being whisked away by a strange transporter beam. Once Zorn is taken, the alien ship then ceases fire and Troi senses satisfaction coming from a source "much closer" than the planet.
Q suggests that Riker take an away team to the alien craft, but Picard is against it. It's only after Riker tells the captain he was about to suggest beaming over to the ship, Picard reluctantly agrees. The team observes that the interior of the alien ship is a maze of tunnels similar to the ones discovered under the power station. They finally locate Zorn who is being tortured in an energy field and screaming for release. Riker and Data disable the field, but their action causes a response from the entire ship. The vessel begins to change form, becoming transparent and glowing with energy. Back on the Enterprise, Q taunts Picard, preventing him from beaming back the away team but suddenly, the away team, along with a frantic Zorn, materialize on the bridge courtesy of the alien itself. They inform the crew that the ship is a life form and Q and Zorn try to goad Picard into destroying it outright. Picard stands down and to everyone's amazement, the alien saucer changes into a gigantic, glowing, jellyfish-like creature.
Picard begins to suspect what is going on and accuses Zorn of capturing an entity similar to the creature before them — one able to convert energy into matter. Zorn pleads for the safety of his people, but Q attempts to push Picard into letting the Bandi die for their treachery. Picard refuses to concede and pieces together the puzzle realizing that the space entity was attempting to punish the Bandi for enslaving its kin. Zorn defends their actions saying it was injured and they tried to help it, but Picard realizes they only kept it alive enough to exploit its abilities.
Picard decides to give the weakened entity on the surface the energy it needs. He directs everyone to abandon the station, and orders an energy beam cast down upon the station's tower. The tower absorbs the energy and a change occurs. The once impressive center complex of the station transforms into a living creature, floating up into space to meet what Picard guesses is its mate. The two creatures greet each other fondly as Picard and his crew proudly watch. Q on the other hand, seems unimpressed, but it is clear Picard has proved humanity's worth. Regardless, Q announces that humanity may have passed this test, but is destined to fail eventually. Picard tells him to get off his ship, and Q warns they will meet again.