In the original Secret Wars comic, Spider-Man first gets the black symbiote on Battleworld.
Marvel Super Heroes Secret Wars was a 12-issue crossover published from 1984 to 1985. The Beyonder transports heroes and villains to Battleworld, a patchwork planet created for their conflict. During the story, Spider-Man discovers an alien machine that can recreate damaged clothing and uses it to obtain what appears to be a new black costume.
The costume is later revealed to be a living symbiote. After Spider-Man returns to Earth, it produces its own webbing, changes appearance at his mental command, and begins influencing his behavior. Mr. Fantastic eventually helps remove it after discovering that intense sound weakens the creature.
The symbiote survives and later bonds with Eddie Brock, creating Venom. A common mix-up is saying Spider-Man found it in outer space or on Earth; in the original storyline, the first encounter occurs on Battleworld, even though the symbiote’s alien nature becomes clear afterward.