Greinke (7-2), who precipitated a bench-clearing brawl in his last appearance against the Diamondbacks June 11, dominated Arizona on two hits over seven innings. The right-hander walked two and struck out seven.
The hurler also stroked three singles, scored a run and added a sacrifice bunt, raising his batting average to .370.
Hanley Ramirez and Andre Ethier each supplied a trio of hits with an RBI while A.J. Ellis drove in a pair of runs as second-place Los Angeles reeled off a 13th win in 16 contests and pulled to within 3 1/2 games of National League West-leading Arizona.
Randall Delgado (1-3) allowed three runs on 11 over six full frames for Arizona, which saw its five-game winning streak snapped.
Eric Chavez drove in the D-backs' only run.
Swim Week Miami Beach 2014 [PHOTOS]