The playoff-contending Dodgers made the trade Friday. They have Kenley Jansen as their closer, but he has been shaky since coming off the disabled list, allowing seven earned runs in four innings over four appearances.
Madson was 5-5 with five saves and a 4.08 ERA in 69 games for Washington. The 38-year-old recently came off the disabled list after being sidelined by nerve irritation that caused pain in his neck and back.
Dodgers manager Dave Roberts said "the numbers aren't indicative of the stuff" with Madson, whose fastball remains in the 96 mph range.
The Dodgers will activate him Saturday and are hoping a change in sequencing can turn his season around. He doesn't have a set role but is expected to pitch in high-leverage situations.
"We're betting on the stuff," Roberts said, "and we're betting on the person."
"Feels like a fresh start, especially to a year I've struggled a little bit," Madson said as he was leaving Nationals Park. "Now none of that matters. All that matters is from this point forward and helping that team win games. That's it."
Madson, who helped Philadelphia and Kansas City win World Series titles, was acquired by the Nationals with fellow reliever Sean Doolittle from Oakland in July 2017.
"Just push the ball to Kenley and that sort of reminds me of old times with [Brad] Lidge. Just push the ball to Lidge and we win," Madson said of his time with the Phillies. "So, push the ball to Kenley and we win."
For his career, Madson is 61-48 with a 3.45 ERA and 91 saves.
After joining the Nationals last July, he went 3-0 with a 1.37 ERA and one save in 20 games as Washington captured its second straight NL East title.
"It was a huge jolt to my career last year, coming into the playoff push and kind of revitalizing ... actually showed myself what I can do," Madson said Friday. "My stuff got so much better, and so I really appreciate them bringing me over here."
Los Angeles (72-62) began the day two games behind Arizona in the NL West and 2½ games back in the wild-card chase.
Washington, which unloaded second baseman Daniel Murphy and first baseman Matt Adams on Aug. 21, received right-handed pitcher Andrew Istler from the Dodgers. Istler, 25, went 4-4 with a 2.37 ERA in 41 games (one start) between three levels of Los Angeles' minor league system.
Additionally, the Nationals recalled left-handed pitcher Sammy Solis from Triple-A Syracuse.
Washington (67-67), the two-time defending NL East champion, entered Friday 7½ games behind first-place Atlanta and 7½ back in the wild-card race.
ESPN's Alden Gonzalez and The Associated Press contributed to this report.