The deal includes a $500,000 signing bonus and salaries of $18 million this year and $22 million in 2013, according to a source requesting anonymity. Lincecum still must take a physical, which the Giants hope will happen early next week to complete the deal.
Lincecum had asked for a near-record $21.5 million in salary arbitration and had been offered $17 million by the club. He remains eligible for free agency following the 2013 season.
The 27-year-old right-hander, the winning pitcher in the Game 5 World Series clincher at Texas in 2010, earned $13.1 million last season when he finished a two-year deal worth $23.2 million.
When the sides exchanged numbers last Tuesday, Lincecum's request neared the record amount sought in arbitration. Houston pitcher Roger Clemens asked for $22 million in 2005.
San Francisco's offer was the highest in arbitration history, topping the $14.25 million the New York Yankees proposed for shortstop Derek Jeter in 2001.
As Giants vice-president Bobby Evans expected, they found common ground around the midpoint of the figures — and did so in only a week.
San Francisco's front office had hoped to lock up Lincecum and fellow starter Matt Cain with long-term deals, though Lincecum seemed set on keeping his options open in the near future on a shorter contract. A call to the pitcher was not immediately returned and his agent declined to comment.
With Lincecum earning a hefty contract, Evans joked last week, "I usually leave off the final three zeroes because it's easier to calculate."
In February 2010, Lincecum agreed to a $23-million, two-year contract ahead of the scheduled hearing. He had been set at that time to ask for $13 million.
That last contract was quite a raise for the undersized, hard-throwing pitcher his teammates call "Franchise" and "Freak" after he earned $650,000 in 2009.
Lincecum — the 10th overall draft pick out of Washington in 2006 — has been an all-star in each of the past four seasons. He went 13-14 with a 2.74 ERA last year for his first losing record.
The Giants scored no runs while he was in the game in seven of 33 starts, had one run six times and two runs five times, according to STATS LLC.
San Francisco, which sold out every game in 2011 but missed the playoffs, will have a payroll of around $130 million.