Shinnie, who started his career at Rangers before joining Inverness CT in 2011, was most recently with Charlton having moved to The Valley last year.
The midfielder is returns to Scotland after spending much of the last eight years in England, enjoying stints with Birmingham City, Rotherham United, Luton Town and Charlton while south of the border.
Livi boss Martindale is delighted to land the experienced midfielder, a week after landing Rangers midfielder Ben Williamson on loan, and the Lions’ new number 22 could make his debut in Wednesday’s Premier Sports Cup clash with Raith Rovers.
“I’m over the moon to bring someone of Andrew’s quality to the club,” Martindale said.
“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.”