Chicago came into the game tied with San Diego for the fewest victories in the National League -- six -- but Maholm led the Cubs to just their second win on the road this season.
Maholm (2-2) gave up a run on five hits over 6 1/3 and left the contest after surrendering a homer to Ty Wigginton in the seventh.
Rafael Dolis came in with the Cubs holding a 3-1 lead and worked the final two innings for his first save. It was his ninth appearance of the season after beginning the year having pitched only once in his career above Class AA.
Starlin Castro put Chicago in front with an RBI single in the fourth and the Cubs struck for two more in the sixth on a run-scoring single from Alfonso Soriano and a double by Ian Stewart that delivered Bryan LaHair from second.
Halladay (3-2) suffered his second consecutive loss, giving up three runs on six hits in seven innings. He allowed only two runs on five hits in seven frames during his previous outing, but lost that one to San Diego.