Moyes, 51, replaces Jagoba Arrasate, who was sacked by the San Sebastian-based clubon Nov. 2 after a poor start to the season, the club said on their website (www.realsociedad.com).
Moyes replaced the retiring Alex Ferguson at United on a six-year deal in May last year but left in April after less than a season.
In 51 matches in charge at Old Trafford, the club won 27, drew nine and lost 15 in all competitions.
Moyes made his reputation as a top-flight coach in his previous job at Everton, who finished in the top six in the Premier League four times under the Scot.
They qualified for the Champions League in 2005 and reached the 2009 FA Cup final, where they lost 2-1 to Chelsea after beating Manchester United in the semi-finals.
Sociedad are 15th in La Liga with nine points from 11 matches following Sunday's 2-1 win at home to champions Atletico Madrid.