Barmes, who comes to the Pirates from Houston, hit 12 homers and drove in 39 runs while batting .244 in 123 games last season with the Astros. He posted a .978 fielding percentage while committing only 12 errors in 539 chances.
"With the signing of Clint Barmes, we have added an above-average defensive shortstop who will bring quality experience and reliability to the club on the playing field as well as a positive veteran presence in the clubhouse," Pirates General Manager Neal Huntington said.
Barmes, who has spent most of his career with Colorado, has totaled 61 homers, 131 doubles and 285 RBI with a .254 average for his career.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'