The deal was announced Monday.
Doumit gets a $300,000 signing bonus, $2.05 million next season, $3.55 million in 2010 and $5.1 million in 2011. The deal includes a $7.25 million club option for 2012 with a $500,000 buyout, and exercising that option also triggers an $8.25 million option for 2013.
The price of option years could escalate by up to $1 million each depending on whether he makes All-Star teams or is voted Silver Slugger awards.
Pittsburgh must decide after the 2011 season whether to exercise the option covering both 2012 and 2013.
Doumit, 27, hit .318 with 15 home runs and 69 RBIs in 116 games for the Pirates last season. He was Pittsburgh's second round pick in the 1999 first year player draft.
The Pirates have also been trying to sign center fielder Nate McLouth to a multi-year contract, but those negotiations recently reached a stalemate.
In 152 games with the Pirates, 27-year-old McLouth hit .276 with 26 home runs and 94 RBIs and was a first-time gold glove winner.
Jerry Crasnick is a senior baseball writer for ESPN.com. Information from The Associated Press is included in this report.