The NL East-leading Nationals improved to 82-52. The club moved from Montreal to Washington for the 2005 season and went 81-81 that year. In 2008 and 2009, the team lost a combined 205 games, then finished 80-81 in 2011.
The Nationals' win allowed them to hold their 6½-game division lead over Atlanta.
Detwiler (9-6) struck out three and walked three, and allowed a runner to third only once.
Jeff Samardzija (8-13) gave up a long home run to LaRoche to lead off the second. LaRoche's 25th home run landed in the front row of the second deck. It's the fourth time in his career LaRoche has hit 25 or more home runs.
Samardzija gave up seven hits in seven innings. He walked one and struck out eight. With July's trade of Paul Maholm to Atlanta, the Cubs have an inexperienced rotation. He's the only starter with more than four wins.
He was envious of the Nationals playing in big games.
"That's your ultimate goal, you know, is to be pitching in those situations, to be pitching for October," Samardzija said.
"We can approach these situations where we're playing these first-place teams where we can look at it and say, hey, we're right there in it and these are big games, and it is going to show a lot with our team. Because we're playing good teams and we're going to be facing their good pitchers and we're going to see the best."
The Cubs have dropped three straight.
"You love playing against these kind of teams. When you're a team in our situation, anytime you can play these first- or second-place teams where they're still playing for something, it means a lot, and they're fun games," Samardzija said.
Sveum was pleased with Samardzija's performance. The former Notre Dame receiver has shown a lot to the first-year manager.
"I think that's what we expect of him as far as big games, big competition. He's a horse, and like I said, the football mentality, when you're playing in front of 100,000 people on national TV, you've got it in you to be that kind of big-game pitcher and competitor against the best of baseball."