The Reds had lost five straight and 10 of their last 11 in the Cactus League.
"It's nice to win. Bottom line is it's still nice to win," manager Bryan Price said. "Even though the games don't matter for the regular season, they do matter for morale."
An error by shortstop Hanley Ramirez paved the way for a four-run third inning against Maholm.
"You're going to have days like this. I've had worse," said Maholm, the backup to Josh Beckett as the fifth starter. "For me, what's important is to be healthy and get my mechanics where they need to be and go from there."
In addition to the solo homer by Frazier and the three-run shot by Heisey, Maholm allowed a double to Ramon Santiago, who later had a second hit.
The Dodgers scored in the fourth inning on singles by Juan Uribe, Andre Ethier and Scott Van Slyke before Justin Turner's sacrifice fly. Ramirez homered off Lee Hyde in the fifth inning, clearing the left-field grass berm.
Cincinnati added a run in the eighth off Dodgers Rule 5 acquisition Seth Rosin. Dodgers non-roster pitcher Red Patterson preceded Rosin with 3 1/3 scoreless innings on one hit.
Up next: The Reds host a night game at Goodyear Ballpark against Texas on Friday at 10:05 ET. Johnny Cueto will take the hill looking to lower his 6.23 spring ERA. Manny Parra and Jeff Francis will also pitch, and a slumping Joey Votto will likely return to the lineup. Votto is hitting just .200 in 25 at-bats this spring.
The game will be available via an exclusive audio webcast, free on Reds.com.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.