The Pirates managed just three hits in a sensational pitcher's duel, but one of them was an RBI single in the first inning by Garrett Jones.
It was Pittsburgh's third straight win while the Cubs have dropped three in a row.
Liriano (3-0) began the campaign on the disabled list with an arm injury, but has been outstanding since making his season debut on May 11. In his three starts he has given up two runs in 18 innings.
He allowed two hits with nine strikeouts against the Cubs on Wednesday, after which Tony Watson and Mark Melancon worked an inning each.
Both of the relievers struck out one and gave up a hit with Melancon collecting his first save.
Samardzija surrendered just three hits with a walk and struck out eight while working seven innings.
Ron Burgundy interviews Peyton Manning on SportsCenter
Florida bear attack: Black bear mauls woman's face