The Pirates announced the deal on Friday night and said it also includes a vesting option for the 2014 season.
Pittsburgh had agreed to a $14 million, two-year contract with Liriano in December, pending a physical. But then Liriano got hurt, putting his status with the Pirates in jeopardy.
General manager Neal Huntington would not get into specifics when he talked last month about the nature of the injury, only saying the team remained in contact with Liriano.
The 29-year-old Liriano is 53-54 with a 4.40 ERA in seven major league seasons. He went 6-12 with a 5.34 ERA in 2012 while splitting the season between the Twins and White Sox.