Legolas was the son of Thranduil, King of the Woodland Realm of Northern Mirkwood, who appears as "the Elvenking" in The Hobbit. Thranduil ruled over the Silvan Elves or "Wood-elves" of Mirkwood.
Although he lived among the Silvan Elves, Legolas was not one himself. His father Thranduil had originally come from Lindon; he and his son were actually Sindar, or "Grey Elves", called in the singular Sinda; "Sindarin" was their language. Thranduil himself was the son of Oropher. Legolas's mother is never mentioned; the Elves of Mirkwood have no Queen at the time of The Hobbit.
Legolas was introduced in The Fellowship of the Ring, at the Council of Elrond in Rivendell, where he came as a messenger from his father to discuss Gollum's escape from their guard. He accompanied the other members of "The Fellowship of the Ring" in their travels from Rivendell to Amon Hen, serving as the company's archer.
There was initially friction between Legolas and the dwarf Gimli, because of the ancient quarrel between Elves and Dwarves arising from the destruction of Doriath in the First Age; and also because Thranduil once imprisoned Gimli's father Gloin. Moreover, the dwarves of Erebor disliked Thranduil ever since he refused to pay them for crafting his raw metals. However Legolas and Gimli began to become friends when Gimli greeted the Elven queen Galadriel respectfully. When the fellowship left Lothlorien, Galadriel and Celeborn gave the members gifts; Legolas received a new longbow.