The "planet killer" was an automated, self-propelled doomsday machine capable of destroying entire planets. This robot was encountered in 2267 by the Federation starships USS Constellation and USS Enterprise. Its origins were unknown, but based on its apparent trajectory, it was believed to have come from a galaxy other the Milky Way.
On or about stardate 4202.1 the Constellation, under the command of Commodore Matt Decker, encountered massive destruction in system L-370 – all seven planets had been utterly destroyed. Proceeding to system L-374 (stardate 4202.3), the ship found three intact planets, and a fourth in the process of breaking up. Orbiting the fourth planet was the planet killer, firing a pure antiproton beam at the planet and consuming the planet's rubble as fuel.
As the Constellation approached, it was attacked by the planet killer. The ship's deflector shields were quickly overwhelmed by the onslaught. The machine proved completely invulnerable to counterattack because its hull was composed of pure neutronium. The Constellation sustained heavy damage. The main bridge was destroyed, the phaser banks were exhausted, the warp drive was destroyed and the impulse drive was severely damaged. In addition, the machine projected a powerful dampening field which cut off all communications with Starfleet Command. The field also deactivated the Constellation's antimatter fuel and left the ship nearly powerless.
Unable to continue the attack or escape, Decker ordered the crew to evacuate to the third planet in the system. Decker himself remained aboard as the last man. However, having finished consuming the fourth planet, the machine then turned towards the third planet. Decker tried to beam his crew back up, but the machine attacked again, damaging the transporter. He could only watch helplessly as the machine consumed the planet below and killed his entire crew of 400 men and women.
A short time later, the Enterprise, under the command of Captain James T. Kirk, received a faint and garbled distress signal. Unable to make out any words aside from Constellation, she entered system L-374 and found her sister ship drifting and abandoned, with Commodore Decker the sole survivor aboard. Assessing the situation using the Constellation's sensor records taken by science officer Masada, Spock projected the weapon's origin. He also determined, based on its present course, that it would enter the most densely populated regions of the Alpha Quadrant, including the nearby Rigel system. Decker became determined to stop the threat posed to the Federation by the planet killer.
The Battle Edit
As the Enterprise held alongside the Constellation, it was suddenly and swiftly attacked by the planet killer. Although the Enterprise was more maneuverable, the weapon was extremely fast and gaining on its target. In the first volley, the Enterprise took heavy damage, with shields almost exhausted and transporters and communications damaged. While Captain Kirk was trapped with the boarding party aboard the Constellation, Spock ordered evasive action. Commodore Decker, taken aboard the Enterprise for medical treatment, exercised his authority to assume command under Starfleet General Order 104 and countermanded Spock's orders to avoid the machine and seek a clear space to warn Starfleet. With a combination of seeking retribution for the loss of his ship and crew, and the presumption that the nearby Rigel colonies would be the next target of the machine, Decker ordered an immediate attack on the weapon. However, the Enterprise was overwhelmed as quickly as the Constellation had been, and soon trapped by a tractor beam which was pulling the ship towards the planet killer's maw.
Meanwhile, on the Constellation, Chief Engineer Montgomery Scott managed to effect partial repairs to the impulse engines and a single phaser bank. Kirk launched a diversionary attack on the Planet Killer that allowed both ships to escape. The planet killer apparently had a relatively simple and straightforward defensive computer program that only allowed it to engage single targets within a specific range. The immediate danger past, Captain Kirk ordered Decker relieved of command of the Enterprise.
As the two Starfleet ships withdrew, the planet killer returned to L-374 and resumed consuming the planetary debris, taking in additional fuel. When Decker gave indications he was going to continue to press the attack despite narrowly avoiding disaster in the previous engagement, he was relieved of command by Spock under direct orders from Kirk on the basis that to continue to press the futile attacks would be indication he was suicidal, and was ordered to report to sickbay for a psychological examination.
Suffering from a mental break-down brought on by extreme stress and the loss of his ship, crew and command, Commodore Decker escaped custody and stole a shuttlecraft from the Enterprise, piloting it on a suicide course directly into the weapon's maw, where it was quickly destroyed. However, the Enterprise sensors detected a small drop in the power output of the planet killer – the shuttlecraft's explosion, however small, had in fact caused some minor damage to the weapon from the inside. Based on this data, Captain Kirk proposed detonating the Constellation's main impulse engines inside the Planet Killer, creating a much bigger explosion and hopefully causing major damage to the weapon, if not destroying it outright.
As the Enterprise held position near the Planet Killer, outside of weapons range, Kirk piloted the Constellation on a direct course toward the weapon. Beaming out at the last second, he detonated the Constellation's engines directly inside the weapon's maw, bypassing the neutronium hull, and effectively dropping its power output to zero (in essence completely disabling the machine). It should be noted that due to the presence of the seemingly impenetrable neutronium hull, the hulk (or "corpse") of the planet killer was left intact, floating lifelessly in space.
Background information Edit
Norman Spinrad was displeased with the model used for the planet killer. As he told Allan Asherman in The Star Trek Interview Book, he envisioned the planet killer bristling with all sorts of evil-looking weapons.
The "planet-eater" was proposed, by J. Michael Straczynski and Bryce Zabel, to appear in a new Star Trek TV series they proposed in 2004. In a fourteen-page treatment which outlined their plans, Straczynski and Zabel supposed, "What if we discover that the device was a left-over piece of warfare tech from the race our characters are pursuing? Do they allow the planet-sized weapon to destroy a sparsely populated colony world if in doing so, they gain the time to get information that could save billions of lives elsewhere?" 
The Star Trek Concordance refers to the device as the "Berserker" or "planet-eater"; the reference book The Monsters of Star Trek also used the berserker moniker in describing the weapon. It is also of note that the sketch of the berserker, titled "doomsday machine", that appeared in the Concordance was sketched by future franchise staffer Greg Jein.
The Ships of the Line book states that that the Planet Killer once had been the monster Norman Spinrad envisioned, boasting a "complete arsenal of weaponry", but centuries of combat had taken their toll so that, by the time the Constellation encountered it, only the main weapon remained.
The "planet killer" was featured in several non-canon productions.
Peter David's novel Vendetta featured another "planet killer" that was believed to have originated as an ancient race's (perhaps the Preservers) last resort weapon against the Borg. According to David's story, the planet killer encountered by the Enterprise was an automated prototype, sent on a course that would have eventually carried it to Borg space, had the Enterprise not stopped it. Its basic design – destroy planets already assimilated by the Borg for use as fuel – coupled with an indestructible neutronium hull and antiproton beam (against which there was little or no defense), made it an ideal weapon against the Borg. This planet killer is much larger and also has the much more menacing appearance Spinrad initially imagined. During the novel's climax, in an engagement with three Borg cubes, the Borg fire weapons powerful enough to actually hurt the machine, revealing a secondary hull of rodinium beneath the neutronium, and an inorganic coolant fluid running through its conduits that causes the planet killer to appear to "bleed" when it is sufficiently damaged. It is finally "destroyed" when the planet killer's pilot attempts to take it up to Warp 10, trapping herself in an infinite time loop where she will always keep trying to reach Borg space but never succeed.
In the novel's prologue, a young Cadet Jean-Luc Picard presents a history report on the planet killer to his class, noting that Captain Kirk's report was somewhat short on details, and so Picard interprets his statement that Commodore Decker died in the line of duty as meaning that Decker, not Kirk, piloted the Constellation into the weapon's maw. He also notes that the planet killer's need for planets as fuel meant that it could not have come from that far outside the galaxy, as there would be no planets for it to 'eat' in the inter-galactic void and it could not have passed through the galactic barrier through sheer inertia.
The WildStorm Comics Star Trek comics included a Voyager miniseries, Star Trek: Voyager - Planet Killer, with another doomsday machine. In this encounter, it was revealed that the machine was the creation of an extinct species designated by the Borg as Species 4672. After attempts to destroy the machine by repeating Kirk's trick with the Constellation fail using a ship belonging to a new ally, they are able to shut it down by coating The Doctor's mobile emitter with neutronium and using the Delta Flyer to transport him inside the machine and inject it with Borg nanoprobes designed to 'infect' it with a 'virus'.
In Kevin Lauderdale's short story "Devices and Desires" (in Constellations), the doomsday machine was taken to The Yard, a top secret facility where the alien technology Starfleet acquired was stored and studied. One of its researchers was Dr. Pad – a reference to Peter (Allen) David, above. This idea for the fate of the original doomsday machine was used for its return appearance in Before Dishonor, a partial sequel to the Vendetta storyline, when a new, upgraded Borg cube led by an assimilated Admiral Kathryn Janeway, now a new Borg Queen, attacked Earth forcing the crew of the USS Enterprise-E to travel to the ship "museum" where the original machine was placed after its destruction. Spock, Geordi La Forge, and Seven of Nine subsequently reactivated the machine and used it to destroy the cube once and for all.
A third planet killer was featured in the novel Armageddon's Arrow; with the original planet killer established as a prototype for the one that featured in Vendetta, the Enterprise-E discover a prototype to the original planet killer on a moon in an unexplored region of space, which has been discovered by the Golvonek, a race inhabiting the planet Urphrel who are at war with their local neighbours. The Golvonek use this crashed version as a template to create their own, more primitive version of the planet killer, capable of destroying planets with a particle weapon but requiring a degree of active crew operation and suffering various operating problems. When the Golvonek planet killer travels back from the future to be discovered by the Enterprise in the present, it is eventually destroyed when its surviving crew crash it into its own past self to convince their worlds to seriously consider peace, while the proto-planet killer is salvaged by Federation scientists for future study.
In the PC game Star Trek: Starfleet Command, the Terran Empire from the mirror universe attempted to unleash a fleet of doomsday machines on our Earth. The player is able to destroy them by beaming prototype mines into the maws of the devices, shutting them down.
In the Gameboy game Star Trek: 25th Anniversary, the entire game plot resolved around a doomsday machine that was discovered heading into Federation space. The player must find scattered parts to a protomatter fusion disruptor, that was built to combat the planet killer.
In Star Trek Online, Ambassador B'Vat's faction of Klingons rediscovered a planet killer, and managed to modify and reactivate it for use as a weapon against the Federation. The player has to destroy the Klingon remote control systems and destroy the planet killer with an experimental Klingon torpedo, the Hargh'Peng. Two more planet killers are introduced in the "Agents of Yesterday" expansion. One of them causes the Galorndon Core to be inhospitable when it sucks up a Na'kuhl ship and it crashes to the planet. Another is fought over between players and Klingon of the 23rd Century.