"I think that him being so good, that's going to bring the best out of other people," Pelfrey said.
Beltran hit a three-run homer in the first inning and Carlos Delgado also connected off Lincecum (10-2) to help the Mets win their fourth in a row. After taking the final three of a four-game series in Philadelphia last weekend, New York is suddenly only 1½ games behind the first-place Phillies in the NL East.
Two of the three hits Pelfrey (7-6) allowed over seven sharp innings were infield singles. He struck out five and walked none in a dominant performance, pushing the Mets (46-44) two games above .500 for the first time since May 20.
"We're doing a lot of things right," Delgado said. "I think we're executing a little better, we're communicating a little better -- and the boys are throwing strikes."
Blanked for the sixth time, the Giants were outhit 14-3.
Lincecum, selected to his first All-Star team Sunday, allowed four runs and a season-high nine hits in six innings. He struck out four, increasing his NL-high total to 126.
"I just didn't feel like I had anything going," Lincecum said. "My arm feels the same as it usually does. I didn't have a rhythm. Today I didn't feel like I had any juice on it."
The 24-year-old right-hander was 6-0 in 12 starts since his other loss, 3-2 against Colorado on April 29.
"He's set the bar so high that when he gives up four in six innings, you look for something different," Giants manager Bruce Bochy said. "You're not going to go out there with your best stuff every start."
Pelfrey is also 24. He hasn't blossomed as quickly as Lincecum, but the 6-foot-7 right-hander appears to be coming into his own this summer.
"He's just got a lot more confidence it looks like out there," Mets catcher Brian Schneider said. "Early on he would nibble, and I know he's not doing that anymore."
Pelfrey hasn't lost in eight outings since dropping his sixth start in a row May 26 against Florida. He escaped a bases-loaded jam in the first and threw 73 of his 113 pitches for strikes.
"The past month he's been unbelievable for us," Beltran said. "He's really becoming the pitcher that everyone thought he would be."
Lincecum gave up a one-out single to Endy Chavez in a 32-pitch first inning, then walked David Wright. Beltran lofted a 2-2 delivery to right that carried over the fence for his 250th career home run.
Delgado added a 435-foot drive to right-center with two outs in the sixth for his 16th of the season and fifth in the past 13 games.
"I feel a lot more comfortable," Delgado said. "That ball was up in the zone and I hit it pretty good."
Argenis Reyes opened the seventh with a pinch-hit single off Jack Taschner for his first major league hit. Jose Reyes reached on a bunt single, and the Mets made it 6-0 on two-out RBI singles by Beltran and Damion Easley.
- The Giants recalled INF Eugenio Velez from Triple-A Fresno.
- Lincecum has given up only seven home runs all season.
- The Mets put RF Ryan Church on the 15-day disabled list again with post-concussion syndrome and recalled OF-1B Nick Evans from Double-A Binghamton.
- New York LF Moises Alou (strained left calf) went 1-for-3 in a rehab game for Binghamton. He played five innings in left field during the opener of a doubleheader.
- Easley extended his hitting streak to 10 games.
- It was New York Jets night at Shea Stadium as the Mets saluted their former housemates from the NFL.