The Twins announced the agreement Thursday morning.
Willingham can earn an additional $1 million in the third season if he reaches 525 plate appearances in the second year of the deal, a league source said. He has only reached that plateau one time in that last four years, with Oakland Athletics last season.
Willingham, 32, is a career .262 hitter with 132 home runs for the Marlins, Nationals and Athletics. He batted .246 with a career-high 29 homers and 98 RBIs for Oakland in 2011.
The Twins were looking for more power from the right side of the plate after trading Delmon Young to the Tigers last season. Willingham has topped 20 homers four times in six full major league seasons.
His signing could mean the end of Michael Cuddyer's run in Minnesota. Twins general manager Terry Ryan said this week that the team has not ruled out Cuddyer's return.
Cleveland, Tampa Bay, Colorado and Boston were among the other clubs that expressed interest in Willingham during the free-agency process.
Adding Willingham, a right-handed hitting outfielder to help balance out a lefty-heavy lineup, would help ease the sting if Cuddyer doesn't return.
Cuddyer hit .284 with 20 homers and 70 RBIs last season, earning an All-Star bid for the first time in his 11-year career. Over the past six seaons, Cuddyer has hit .266 with 66 homers while Willingham has hit .257 with 69 home runs.
Willingham has played mostly left field throughout his career, but the Twins would likely have to move to him right field if Cuddyer goes, so the weak-armed Ben Revere could play left field.
The Twins were looking for more power from the right side of the plate to help balance a batting order that has lefties Denard Span, Joe Mauer and Justin Morneau near the top. Willingham has topped 20 homers four times in six full major league seasons, and the hope is he will have similar success at spacious Target Field, one of the most difficult ballparks to hit it over the fence.
If Cuddyer does leave, the Twins would receive two draft picks as compensation.
He has been a Gardenhire favorite for years because of his hustle, discipline, dependability and versatility. Cuddyer has played right field, center field, first base, second base, third base and DH over the last few seasons for the Twins, filling in for numerous injuries the team has endured.
But the Twins are also determined to keep the payroll at around $100 million, meaning Cuddyer would likely have to take a decent paycut from the four-year, $33 million contract he just finished to stay in Minnesota.
Jerry Crasnick is a senior baseball writer for ESPN.com. Information from The Associated Press was used in this report.