The Gospels of both Matthew and Luke place the birth of Jesus in Bethlehem. Although Matthew does not explicitly state Joseph's place of origin or where he lived prior to the birth of Jesus, the account implies that the family lived in Bethlehem, and explains that they later settled in Nazareth. However, Luke 1:26–27 clearly states that Mary lived in Nazareth before the birth of Jesus, at the time of the Annunciation.

The Gospel of Luke states that Mary gave birth to Jesus and placed him in a manger “because there was no place for them in the inn", but does not say exactly where Jesus was born. The Greek word kataluma may be translated as either “inn” or “guestroom”, and some scholars have speculated that Joseph and Mary may have sought to stay with relatives, rather than at an inn, only to find the house full, whereupon they resorted to the shelter of a room with a manger. This could be a place to keep the sheep within the Bethlehem area, called "Migdal Eder" ("tower of flock") as prophesied by prophet Micah in Micah 4:8.

More Info: en.wikipedia.org