Lincecum (5-11) gave up six hits and a run while striking out seven, including freezing pinch-hitter David Wright on a pitch to end the top of the seventh. The Mets left the bases full and the Giants tacked on an insurance run in the eighth on Marco Scutaro's RBI single.
The Giants, who moved a game ahead of the Dodgers for first place in the NL West, made a significant trade prior to Tuesday afternoon's non-waiver dealing deadline. They acquired outfielder Hunter Pence from the Phillies.
Heading to the Phillies were outfielder Nate Schierholtz, catching prospect Tommy Joseph, who played for the United States in this year's Futures Game, and minor league pitcher Seth Rosin. The Giants also got cash in the deal.
Pence arrived to AT&T Park just after the game ended and signed a few autographs before meeting his new teammates.
Justin Turner doubled in Scott Hairston in the second inning, but the Mets couldn't give Matt Harvey (1-1) enough run support in his second career start. Harvey gave up four hits and fanned seven over six innings.
"He didn't have the command that he did the first time out. I thought he pitched very well and kept us in the ball game," Mets manager Terry Collins said.
The Giants loaded the bases in the second and the Mets should have had an inning-ending double play on a ball hit by Brandon Crawford, but Ruben Tejada threw high and wide of first base, allowing Brandon Belt to score.
Ryan Theriot scored on Scutaro's double-play grounder in the sixth before Lincecum escaped trouble the following inning when Wright froze on a 78 mph curveball.
"I thought he had all his pitches going. He was under control too," Giants manager Bruce Bochy said. "Great poise out there. It's hard to throw a better pitch than to get him what he did in that at-bat. He pitched like the Timmy we know."
Scutaro's base hit to center plated Theriot in the eighth.
Jeremy Affeldt had three strikeouts over the final two innings to get his second save of the year.
In addition to acquiring Pence, the Giants also recalled infielder Brett Pill from Triple-A Fresno...The Giants have won 12 of the last 17 games against the Mets...New York is 4-14 since the All-Star break.
For more on the Giants, head over to McCovey Chronicles.