Nix played with Philadelphia, Pittsburgh and Kansas City last season, batting .120 over 41 games. The 32-year-old spent the previous two seasons with the New York Yankees.
Nix played all four infield positions last season and also saw time in the outfield. He broke into the majors in 2008 with Colorado and has a career batting average of .212 with 38 homers and 130 RBIs.
His best season was in 2012 with the Yankees, when he hit .243 with four homers and six steals in 74 games.
Baltimore announced the agreement Tuesday.