The 32-year-old older brother of Scottish international Graeme Shinnie was a free agent after leaving Charlton Athletic following the conclusion of the 2020/21 season.
The midfielder formerly played for Inverness Caledonian Thistle and Hibs after coming through the ranks at Rangers.
Livingston boss David Martindale expressed his delight at getting someone with Shinnie’s pedigree to sign for the West Lothian club.
He told the Livingston website: “I’m over the moon to bring someone of Andrew’s quality to the club. I honestly think it’s a real coup for the club and testament to Livingston FC as a whole that Andrew decided to sign here for the next two seasons.
“I see Andrew operating anywhere along the front 4. He is technically gifted, looks after the ball well and understands the game. He brings a wealth of experience to the squad and I’m sure will prove an invaluable asset going forward, both on and off the park.
“You simply don’t play the number of games at the level Andrew has without being a very good footballer.
“Andrew showed a desire to come to the club from our first phone call and the board has backed both Marvin and I’s judgement. Marvin played with him at Hibs and has played a big part in persuading Andrew to sign with Livingston.
“I am excited to see Andrew in a Livingston shirt and know he will prove to be a great signing.”