Updated

The Giants and two-time Cy Young Award year contract, avoiding arbitration.

The San Francisco Chronicle reported the deal on Tuesday, which will buy out Lincecum's final two years of arbitration eligibility, to be worth $40.5 million. According to the paper, the right-hander will earn $18 million this coming season and $22 million in 2013. He also receives a $500,000 signing bonus.

Lincecum, 27, had 2.74 earned run average and struck out 220 batters over 217 innings last season but still wound up with a losing record (13-14) because of the Giants' light-hitting offense. San Francisco was next-to-last in the league in runs with 570. Only Seattle (556) scored fewer than the Giants.

The Washington native owns a career record of 69-41 with a 2.98 ERA.