Marquis (4-5) struck out eight and walked one in notching his third win in three starts.
Huston Street tossed 1 1/3 innings of scoreless ball for his 17th save as the Padres avoided a three-game sweep at the hands of the Giants.
Guzman (3-for-4, three runs scored) unloaded a two-run blast with the Padres leading 3-1 in the fifth to break the game open, and added a solo shot in the eighth to cap the Padres' scoring.
Chase Headley contributed a bases-empty home run for San Diego.
Giants starter Tim Lincecum (4-11) struck out eight over 4 2/3 frames surrendered five runs on seven hits and three walks to take the loss.
Ryan Theriot and Melky Cabrera each drove in a run for National League West-leading San Francisco.
Rosie O'Donnell unveils nearly 50-pound weight loss
Members of Congress to keep receiving porn magazine