The greatest of the forests of Middle-earth, Mirkwood lies in a region named Rhovanion or Wilderland on the east side of the Hithaeglir (Misty Mountains). It was orginally called Eryn Galen (Greenwood the Great) and was inhabited by those elves who had refused the great journey westward to Aman (Silvan elves).
In the Second Age, after the destruction of Beleriand, Oropher and his son Thranduil (both Sindar) travelled eastward and took up residence among the Silvan elves of Eryn Galen, with Oropher becoming their leader.
Around TA 1050 Sauron's shadow began to fall over the forest with the raising of his stronghold, Dol Guldur, on the hill of Amon Lanc, which had been a dwelling of the Silvan elves during the Second Age, in the southern part of the forest. Due to Sauron's influence, Orcs, black squirrels, and giant spiders filled the woods and it became a dark and foreboding place. Only the Elves of the Woodland realm, now under the rule of Thranduil (his father, Oropher, had been killed during the battle of the Last Alliance at the end of the Second Age) and the Woodsmen retained their settlements in the northern parts of the forest. At this time Eryn Galen was renamed Taur-nu-Fuin (Forest under nightshade), but most notably it was called Taur-e-Ndaedelos, or Mirkwood in the tongues of Men.
Eventually Sauron was defeated at the end of the Third Age by the destruction of the One Ring and his dark influence receeded from the forest, with the help of the combined forces of Thranduil and Celeborn's from Lothlórien. With the darkness removed from Mirkwood, the forest was renamed Eryn Lasgalen, 'Wood of Greenleaves'.