The Dark Spirit, a sinister entity, existed as a potent protean embodiment of the dark side of the Force. It resided within the Dark Side Cave located on the planet of Dagobah. This entity was a source of evil. Following the birth of the Galactic Empire in 19 BBY, several individuals encountered this Spirit. Among them was Jedi Master Yoda, who was confronted by a spectral image of the Galactic Emperor Palpatine.
Luke Skywalker, a young man, also dueled this enigmatic entity later, twenty-two years after the first encounter. This occurred during his apprenticeship under Yoda's guidance. The spirit manifested as Darth Vader, who was his father. Despite this, Skywalker managed to overcome the spirit, causing the apparition to disappear once again.

Around 700 BBY, a Dark Jedi from the Bpfasshi species, who commanded a group of similar darksiders, suffered a fatal wound in a duel against Jedi Knight Minch. The wounded darksider sought refuge in a cave on the swamp planet of Dagobah, where he met his end. The location of the Dark Jedi's demise absorbed his malevolent energies, transforming it into the Cave of Evil and becoming the dwelling place of the Dark Spirit, a protean representation of the dark side. This terrifying specter possessed prophetic abilities, revealing the darker aspects of one's own nature to those who confronted it. Although supposedly confined to the cave, the Dark Spirit had the ability to traverse the swampy terrain of Dagobah, emitting an aura of fear and hatred that could overwhelm the minds of most Force-sensitives, weakening or even immobilizing them. It is known that at least one other entity with comparable abilities existed within the Dark Force Temple situated on the Sith world of Dromund Kaas.
When the Galactic Empire was established in 19 BBY, Yoda chose to reside on Dagobah to escape the new regime's anti-Jedi persecution. At some point, the aged Jedi Master ventured into the Cave of Evil. There, he encountered the Dark Spirit, which manifested as his nemesis, Palpatine, the Galactic Emperor and Dark Lord of the Sith. Immediately before his self-imposed exile on Dagobah, Yoda had fought the actual Palpatine within the Grand Convocation Chamber of the Senate Rotunda, forcing the Jedi to retreat. Now, within the Cave, Yoda confronted the grinning Spirit armed only with a gimer stick, without his lightsaber.
In 1 BBY, the clone of Galen Marek, a deceased pioneer of the Rebel Alliance, arrived on Dagobah seeking his identity. Upon entering the Cave of Evil, he faced the Dark Spirit, which assumed various forms. Initially, the entity appeared as numerous "clones" of the young man, entangled in vines and pleading for assistance. Shortly after, the spirit transformed into captain Juno Eclipse, an acquaintance of Marek, positioned on a ship's bridge. The clone then witnessed the false Eclipse under attack, causing him great distress. He called out to the apparition, but both Eclipse and the rest of the vision vanished abruptly.
Two years later, Zak Arranda, a young Force-sensitive individual, inadvertently led a group of cannibalistic younglings into the Cave. The Dark Spirit tormented them by recreating scenes from their past, depicting their parents being forced to feed them their own flesh.

By 3 ABY, Yoda had been in hiding from the Empire for a number of years. As part of training, Yoda instructed Luke Skywalker to enter the cave and confront the Dark Spirit. Upon the apprentice's arrival, the phantom took on the guise of Darth Vader, a Sith Lord and Palpatine's second-in-command. Unbeknownst to the young apprentice, Vader had previously been a Jedi Knight known as Anakin Skywalker and was also his father, whom Skywalker believed to have been murdered by Vader. Following a brief duel, Skywalker succumbed to rage and decapitated the spirit. As the apprentice observed the helmet-clad head fall to the ground, the Dark Spirit's armored form completely disappeared into the shadows. For a moment, the helmet remained motionless on the ground, then its faceplate exploded, revealing Luke Skywalker's own face looking back at him. The young apprentice realized that, despite defeating this construct, he still needed much more training before facing the real Vader. Almost instantly, the spectral image of the severed head dissolved into nothingness.

The Dark Spirit possessed the ability to assume the form of its victim's fears or darker aspects. It could move freely and almost invisibly through the Dagobah swamp, detectable only by individuals strong in the Force. During combat, the entity emitted an aura of hatred and fear that could unsettle and even paralyze an opponent. Unlike Force ghosts, which were typically intangible, the Spirit appeared entirely tangible to those who faced it. When appearing as Darth Vader or Palpatine, it even wielded a phantom lightsaber capable of cutting like a real one. Beyond simply transforming into a single being, the spirit could actually manifest as multiple individuals simultaneously and recreate entire scenes with realistic backgrounds. It also had the power to alter its victim's perception of their own appearance.
In the games LEGO Star Wars II: The Original Trilogy and LEGO Star Wars: The Complete Saga, the duel with the Dark Spirit is significantly altered for gameplay purposes. For example, Yoda participates in the duel because all levels require two players.
"Game On!", an article featured in Star Wars Insider 135, suggested that the duel in the Cave of Evil with the Dark Spirit in Empire Strikes Back may have inspired the fake Vaders (Clados, Gyaos, Sasori and Wampa) in the ambiguously canon Japanese Star Wars game from 1987, who were described as "intended as illusions representing Luke's fears." However, the game contradicts this claim because these opponents were able to capture Luke Skywalker's allies and imprison them, suggesting that they were real creatures rather than mere illusions.
In the Game Boy Advance game Star Wars Trilogy: Apprentice of the Force, the Dark Spirit in Vader's form appears as a boss during the Dagobah: Training segment of the Empire Strikes Back storyline. However, unlike the film, the spirit remains passive and only requires a single lightsaber strike to defeat, with his defeat animation simply showing him kneeling and moving his arm. Furthermore, his defeat does not include his decapitation by Skywalker.