From The Silmarillion, Chapter 23: Of Tuor and the Fall of Gondolin
"But often Maeglin went with few of his folk beyond the leaguer of the hills, and the King knew not that his bidding was defied; and thus it came to pass, as fate willed, that Maeglin was taken prisoner by Orcs, and brought to Angband. Maeglin was no weakling or craven, but the torment wherewith he was threatened cowed his spirit, and he purchased his life and freedom by revealing to Morgoth the very place of Gondolin and the ways whereby it might be found and assailed. Great indeed was the joy of Morgoth, and to Maeglin he promised the lordship of Gondolin as his vassal, and the posession of Idril Celebrindal, when the city should be taken; and indeed desire for Idril and hatred for Tuor led Maeglin the easier to his treachery, most infamous in all the histories of the Elder Days."
Thanks.