Bonifacio, 28, played for the Toronto Blue Jays and Kansas City Royals last season, appearing in 136 games while batting .243 with three home runs and 31 RBIs. The switch-hitter has a career .262 batting average in seven major league seasons.
"He's added depth," Cubs manager Rick Renteria said. "He can play second, short, third and outfield. He's a versatile individual who's played in the major leagues. He's definitely a National League ballplayer."
Bonifacio, who also had 28 stolen bases last season, was released by the Royals on Wednesday.