The 39-year-old did not play for the Dons after signing from Hearts in a predominately coaching capacity last summer, but impressed on trial.
Manager David Hopkin told Livingston's website: "I have been chasing Neil for close to two months now.
"He will be fantastic for us, of that I have no doubt."
Alexander, who has three Scotland caps, joined Livingston in 1998 from Stenhousemuir and left to join Cardiff City three years later.
He subsequently had spells with Ipswich Town, Rangers and Crystal Palace before joining Hearts, making his final appearance in the Scottish Premiership in April 2016.
"He brings a wealth of experience to the team, having won previous league titles with Hearts and Rangers, with the added bonus of a European final during his time at Ibrox," added Hopkin.
"Neil is a very fit individual who has looked after himself impeccably over the years and will be invaluable to our young squad this season."
Alexander becomes Hopkin's sixth signing for Livi's return to Scotland's second tier after winning League One.
Forward Dylan Mackin was previously with Motherwell, midfielders Scott Robinson and Ross Brown were both at East Fife and striker Josh Peters with Forfar Athletic.
Meanwhile, Hearts striker Nikolay Todorov has returned for a second loan spell.
Former Scotland goalkeeper Neil Alexander has returned to Livingston for a second spell after being released by Aberdeen.