(covers information from several alternate timelines)
Due to what was theorized to be wormhole displacement, the USS Franklin was stranded on Altamid in the mid-22nd century. Three crewmembers under the leadership of captain Balthazar M. Edison (later known as Krall) survived on the planet, and started abducting species to enslave and use for rejuvenation.
As of the mid-23rd century, the nebula was uncharted space. Low range scans could not return data on parts of the nebula due to its high density. Ships entering the nebula could not maintain communications with Yorktown. The Federation had been using Magellan probes to chart the nebula, and built Starbase Yorktown nearby to facilitate further exploration.
At one point, Krall's forces captured one of the Federation's Magellan probes, the signal of which they piggybacked on to access information in the Yorktown database, including schematics and ships' logs.
In the year 2263, following the arrival at Yorktown of Kalara, who claimed her ship had crashed on a planet inside the nebula, the USS Enterprise was ordered to enter the nebula on a rescue mission. It was considered suited for the mission since it had the most advanced navigational system in the fleet (save for one ship still under construction at Yorktown).
Once inside the nebula, the Enterprise's power systems were disrupted, but the ship safely arrived in orbit of Altamid, only to be attacked and destroyed by Swarm ships commanded by Krall. Imprisoning much of the Enterprise crew on Altamid, Krall allowed Lieutenants Hikaru Sulu and Nyota Uhura to send a distress call to Yorktown, but altered the distress coordinates to direct any rescue ships sent by Starfleet into the nebula, leaving the starbase open to attack. (Star Trek Beyond)