Freddy Garcia (12-6) went seven innings to get the win as he gave up two runs on four hits with a strikeout over seven-plus frames.
Boston, which was eliminated from postseason contention on Tuesday, got on the board in the fourth. Ortiz's RBI single plated Marco Scutaro, who led off the inning with a double.
Chicago, though, tied the game in the bottom of the frame on a homer from Pierzynski.
The score remained that way until the seventh when Chicago went ahead. With two on, Vizquel plated one with a single and Brent Lillibridge brought home another with a bunt single that saw Victor Martinez's throw to first go wide. An RBI single later in the frame from Ramirez made it a 4-1 game.
The Red Sox got one back in the eighth on a leadoff homer from Lowell, but Juan Pierre's double play groundout in the bottom of the frame got the run back.
Matt Thornton, who got the final out of the eighth, set Boston down in order in the ninth to pick up his eighth save of the season.
Chicago right fielder Carlos Quentin left the game in the fifth with an injured ankle...The White Sox have taken five of the six games against Boston this season...Beckett fell to 4-2 over eight starts against Chicago...Garcia improved to 8-2 in 16 starts against Boston.