The Giants handed Colorado its third straight loss and moved within two games of the Rockies for the lead in the National League wild-card race.
Lincecum, the ace of the San Francisco staff and last year's winner of the National League Cy Young Award, improved to 13-4. He struck out eight and allowed only two Colorado runners to reach second base.
Brian Wilson completed the shutout, giving up a single while striking out two in the ninth for his 31st save.
Pablo Sandoval put San Francisco in front with a solo homer in the fifth. The Giants also scored in the sixth on a walk to Eli Whiteside, a sacrifice by Lincecum and an RBI single by Eugenio Velez.
Ubaldo Jimenez (12-10) suffered the hard-luck loss, giving up two runs on seven hits in seven innings.
Copyright 2009 by United Press International.