Although it's Manannan's sword, Lugh wears it in the story of The Fate of the Children of Tuireann. He has Manannan's horse, lorica (breastplate) and his sword, probably because Manannan fostered him.
Two translations, one by Eugene O'Curry and another by P.W. Joyce both mention this, so presumably there's the source. (I found these sources here, by the way.) I didn't have much luck until I checked James MacKillop's dictionary of Celtic mythology and discovered that the sword was called Frecraid as well as Fragarach. If you Google the latter you get more useful hits.
According to the book Myths and Legends of the Celts, Lugh got the sword in Tir na mBeo, the otherworld called the Land of the Living, but it doesn't give a source.