Scherzer (6-6) scattered the five hits over seven innings with no walks and eight strikeouts. Boyer retired the six batters he faced in relief.
Gerardo Parr had three hits -- one a two-run homer -- and four RBI. Mark Reynolds had two hits -- one a two-run third-inning homer, and Ryan Roberts and Chris Young had two hits and one RBI apiece. Stephen Drew had two hits, while Miguel Montero added one RBI for the Diamondbacks, who have won four of six.
Garrett Jones, Brandon Moss, Jack Wilson, Steve Pearce and Ryan Doumit all had one hit for the Pirates, who have lost four of six.
Losing pitcher Virgil Vasquez (1-5) surrendered four runs and six hits in three innings.