Bonifacio's first hit of the game came in the sixth and drove in Brett Hayes for the run that put the Marlins ahead 4-1. His 26-game streak is the longest in the majors.
Brian Sanches (4-1) picked up the win with 1 1/3 innings of one-hit relief while Washington starter John Lannan (7-7) suffered the loss after giving up four runs on five hits and four walks in 5 2/3 innings.
Bonifacio scored the game's first run after a third-inning walk and the Nationals tied the score on Jayson Werth's RBI single in the bottom of the inning.
The Marlins scored on a safety squeeze in the fourth with Brad Hand bunting, Lannan threw to first and Mike Cameron was able to score easily.
Mike Stanton led off the Florida sixth with his 24th home run of the season and Bonifacio's base hit later in the inning put the Marlins up by three runs.
Werth singled in another run for Washington in the seventh but Florida answered in the eighth without a hit. Cameron walked and stole second. He went to third on a wild pitch and scored on a groundout.