Aredhel had left Gondolin to wander through the world, and in the woods of Nan Elmoth met Eöl, and stayed with him, eventually giving birth to Maeglin. When she left Eöl, she took Maeglin with her and returned to Gondolin. But Eöl had followed her, and in judgment before Turgon, attempted to kill Maeglin with a poisoned dart, but hit Aredhel instead, who died, and Eöl was cast down from the city walls.
Maeglin was now an orphan, but Turgon held him in honor, and Maeglin both learned and taught much. He found rich lodes of metals in the Echoriath surrounding the city, forged weapons of steel stronger than had been seen before, and fought alongside Turgon in the Nirnaeth Arnoediad.
But although one of the mighty of Gondolin, he most desired Turgon's daughter (and Maeglin's first cousin) Idril. But there was no hope for him, it being forbidden to marry so close in a family, and indeed Idril was repulsed by the knowledge of his desire for her.
When Tuor came, carrying Ulmo's warning of the danger to Gondolin, Maeglin sat on the right hand of Turgon and argued against Tuor. But Maeglin, seeking after metals, defied Turgon's order to stay within the mountains, and was captured by Orcs and brought to Angband. Morgoth promised both Gondolin and Idril in return for the location of the hidden city, thus luring Maeglin into the greatest treachery done in the Elder Days. Maeglin returned to Gondolin saying nothing; when the hosts of Morgoth attacked and overran the city, Maeglin fought with Tuor on the walls, and Tuor threw him to his death.