The 50-year-old, who previously managed Llanelli in Welsh football's top-flight, succeeds Neville Powell.
Powell was sacked after nine years in charge, having won three Welsh Cups and the Welsh Premier League in 2010-11.
Legg started his professional career at Swansea City and also played for Notts County, Birmingham City and Cardiff City.
"For me, Bangor City FC is the biggest club in the Welsh Premier League and enjoys the best support," said Legg, who won six caps for Wales.
"There was only one team that would bring me back to the Welsh Premier League and that's Bangor City.
"I'm looking forward to the challenge."
Ex-Wales international Andy Legg has been appointed manager of Welsh Premier League side Bangor City.