Keita will be a free agent next month when his contract with Liverpool expires.
The Guinea international has not been able to show his real quality in five years at Anfield, with injuries playing a huge part in the disruption of his flow.
Keita won the Premier League, League Cup, Fa Cup, Champions League, UEFA Super Cup and FIFA Club World Cup during his time at Anfield.
The 28-year-old previously spent two seasons in the Bundesliga with RB Leipzig.
Keita made 129 appearances in total for Liverpool, scoring 11 goals.
"I'm really looking forward to the next challenge in Bremen," Keita said on signing.
"The talks with the bosses, the environment and Werder's style of play convinced me. The coach gave me a really good feeling and showed me that I can help the team. Werder is a special club and I know the Weserstadion from my time at Leipzig. The club and the philosophy are the right fit for me. It's the right step for me."
Bremen finished 13th in the Bundesliga this season.
"A number of clubs are obviously going to be interested when a player like Keita is available on a free transfer," said Clemens Fritz, head of scouting and professional football at Werder Bremen.
"He suffered an injury setback at the start of this season and that meant he didn't play as often as he'd have liked to.
"We now want to get him back to his best."