The deal bolsters the Nationals' bench as they try to make a late run for a playoff spot.
The Cubs receive a player to be named in the deal. They also save about $2.5 million, including $1.5 million to buy out a 2014 option for $6.5 million.
DeJesus, 33, is batting .250 with six home runs and 27 runs batted in.
Third baseman Placido Polanco was put by the Miami Marlins on the seven-day disabled list because of a concussion.
Polanco was hit in the back of the helmet with a pitch Friday.
The Marlins purchased the contract of infielder Gil Velazquez from triple-A New Orleans.
The Texas Rangers plan to purchase Travis Blackley's contract from triple-A Round Rock for the left-hander to start Tuesday against the Houston Astros, the team that just traded him.
Texas, which acquired Blackley last week, will have to make another move before Tuesday's game to add Blackley to its 25-man roster.
Blackley will fill in for Alexi Ogando, who has an inflamed nerve in his right shoulder.
Blackley was 1-1 with a 4.89 earned-run average in 42 relief appearances for Houston.