Baker led the Nationals to back-to-back National League East titles but saw his team defeated in the opening round of the playoffs on each occasion.
The Nats were eliminated in five games last week by the Chicago Cubs. Baker's dismissal was announced in an open letter to fans by the Nationals ownership.
"This was an incredibly difficult decision for us," the team's owners wrote.
"Dusty Baker led the team to the first back-to-back division titles in our history and represented our club with class on and off the field. He is one of the true gentleman in our sport, and we thank him for the successes that we enjoyed together over the last two years.
"We wish him nothing but the best going forward."
The former All-Star outfielder later told USA Today he was "surprised and disappointed" at his dismissal.
"They told me they would get back to me and I told them I was leaving town yesterday and they waited 10 days to tell me," Baker was quoted as saying.
"I really thought this was my best year. We won at least 95 games each year and won the division back-to back-years but they said they wanted to go a different direction. It's hard to understand."
Washington general manager Mike Rizzo later told reporters the move was "a pure baseball decision" aimed at helping the Nationals achieve the ultimate goal of a World Series crown.
"We have come such a long way in the Nationals organization," Rizzo said.
"Now our expectations have grown to the fact that winning a lot of regular-season games and winning divisions is not enough."