The Girdle enclosed the three forests of Neldoreth, Region, Nivrim and part of the land of Aelin-uial. All those who attempted to pass through it became enmeshed and wandered aimlessly as if lost in an impossible maze of trees, placing them in a situation where their food would eventually run out and they would die. The Girdle also protected Doriath from the dark influence and prying eyes of Morgoth, similar to the way Galadriel used Nenya to protect Lothlórien from Sauron.
Only those permitted by Thingol or Melian, or with power greater than Melian, could successfully navigate through it. The only recorded two to have passed through against her will were Beren and Carcharoth.
The Girdle of Melian was raised by Melian shortly after the First Battle of Beleriand to ensure that Doriath remain untouched by the forces of the enemy. When the Ñoldor returned to Middle-earth from the West, Thingol sought to bar them from settlement in the lands of the Sindar and would only permit guests into Doriath through the barrier. After learning of the Kinslaying of Alqualondë, Thingol forbade all Ñoldor, save for those of the House of Finarfin his kin from entering the realm through the barrier.
The Girdle's long history of barring unwanted intruders came to an end in the fourth century of the First Age. Beren passed through unrestrained and later during the Quest for the Silmaril; the crazed Carcharoth breached the barrier for he could not be stopped.
The Girdle was lifted by Melian who after the death of Thingol soon left Middle-earth and returned to Aman. Doriath lay unprotected from then on.