The 27-year-old Boller spent all of last season, his sixth with the Baltimore Ravens, on injured reserve with a shoulder injury sustained in the preseason.
He was Baltimore's first-round pick in the 2003 draft.
"We are happy to add Kyle to our roster," new coach Steve Spagnuolo said in a statement. "We feel that he'll be a valuable addition to our team."
Boller is 10 years younger than Gus Frerotte, the player the Rams had been negotiating with to return as a backup. Frerotte was released with a year to go on a three-year contract before last season, then went 8-3 as the starter with Minnesota.
Boller started 42 games with the Ravens and holds the franchise record with 7,846 yards with 45 touchdown passes and 44 interceptions. But his inconsistent play led to the Ravens taking Joe Flacco in the first round last year.
Boller's best season was 2004, when he started every game and passed for 2,559 yards with 13 touchdowns and 11 interceptions.