On July 31, 2019, the Mariners traded Elías and Hunter Strickland to the Washington Nationals in exchange for Aaron Fletcher, Taylor Guilbeau, and Elvis Alvarado. Elías made his Nationals debut on August 2, 2019, recording the final two outs of the sixth inning. However, he was forced to leave the game and was placed on the 10-day injured list after he pulled his right hamstring running down the first-base line during an at-bat the following inning. In 2019 he pitched three innings for the Nationals. Between the Mariners and the Nationals combined in 2019, he was 4-2 with 14 saves and a 3.96 ERA, as in 48 relief appearances he pitched 50.0 innings. The Nationals finished the 2019 year with a 93-69 record, clinching the wild card, and eventually won the World Series over the Astros. Elias was not part of the Nationals' postseason run, but still won his first world championship. Elias was outrighted off of the Nationals 40-man roster on October 9, 2020, and elected free agency the next day.