The Cottagers also managed to offload controversial forward Aboubakar Kamara and sign Norway international Havard Nordtveit on loan.
The move for Markovic, which was announced after the 11pm Thursday deadline passed, was unexpected.
The Serbian has signed on a short-term permanent deal until the end of the season after being released by the Merseysiders. Markovic failed to make an impression at Anfield after arriving from Benfica in 2014.
He made just 34 appearances for the club, scoring three goals, and has had loan spells at has had loans at Fenerbahce, Sporting Lisbon, Hull and Anderlecht in recent seasons.
The Cottagers, 19th in the table and six points off safety, will hope he can give the club a lift.
Vice chairman Tony Khan told the club's website: "Lazar Markovic is a gifted young player.
"We're pleased to welcome him from Liverpool for the remainder of the season.
"Lazar is known as a great team-mate, he has the support of our manager and he has the talent to strengthen our attack."
Markovic's signing came after Kamara joined Turkish club Yeni Malatyaspor on loan.