The 28-year-old center, who could have become an unrestricted free agent July 1, has 28 points (11 goals, 17 assists) this season.
"In my case, I'm only going to have one time to be [an unrestricted free agent] when I'm still in my 20s, and that's a once in a lifetime opportunity," Eller said. "But looking at the options, I wanted to stay here. ... It's a good fit for me on the team. I think the team is going to be competitive, not just this year, but the next couple of years with the core that they have.
"This club and this city has been a great fit for me personally, for my family. There's just so many things that have been good about it. It's been good for my career. I've found my game here, especially this year. I couldn't be happier to make this happen."
Washington acquired Eller on June 24, 2016, in a trade with the Montreal Canadiens for a second-round pick in the 2017 NHL Draft and a second-round pick in the 2018 NHL Draft.
Capitals general manager Brian MacLellan said signing Eller to a long-term contract was an important factor with the NHL Trade Deadline on Feb. 26 and solidifies Washington's depth at center behind Evgeny Kuznetsov and Nicklas Backstrom.
"It's nice to know that Lars is going to be here going forward, so that takes [the trade] option off the table for us to consider," MacLellan said. "We have a third-line center going forward.
"I think [the centers'] skill sets complement each other. They're comfortable with their roles, everybody, and [coach Barry Trotz] is comfortable with it, so it's a good fit for everybody."
Selected by the St. Louis Blues with the No. 13 pick in the 2007 NHL Draft, Eller has 209 points (96 goals, 113 assists) in 576 NHL games in nine seasons with the Blues, Canadiens and Capitals.
"[Eller] has a lot of determination in his game," Trotz said. "He's really strong. Obviously he has puck-possession skills and has a lot of confidence with the puck right now. I just think where he plays ... and how we play him, there's a good comfort level.
"We're an organization that [is] pretty deep at center ice. Those guys are assets in the organization, for sure. I think every good team, it doesn't matter what sport, if you're showing up the middle, you've got a chance."