The Pirates ended a four-game losing streak and avoided being swept in a three-game series by the division-leading Athletics.
Liriano (9-3) gave up four hits and struck out six over seven innings. He has won his last four starts and six of his last seven.
Justin Wilson gave up a hit in the eighth and Jeanmar Gomez worked a perfect ninth to complete the shutout.
Pedro Alvarez drove in two runs to lead the Pittsburgh attack, which produced a dozen hits.
Both Russell Martin and Alvarez singled in a run in the fifth.
Oakland starter Tommy Milone (8-8) gave up three runs on seven hits in 2 2/3 to suffer the loss.