The deal includes the chance to earn $3 million in performance bonuses.
A right-hander who turns 30 on March 31, Wang had spent his entire five-year major league career with the Yankees, who allowed him to become a free agent in December when they failed to offer a 2010 contract.
He made $5 million last year, when he was 1-6 with a 9.64 ERA and his season was cut short by shoulder surgery on July 29. He is not expected to be able to pitch until sometime between April and June.
"We don't have a date where we're saying that this is when we want him to come back and pitch," Nationals manager Jim Riggleman said. "He's going to come back and pitch when he's ready."
Wang was a 19-game winner in 2006 and 2007, starting New York's postseason openers in both years, but his career was sidetracked when he severely injured his right foot while running the bases at Houston on June 15, 2008.
"He's won 19 games in the toughest division in baseball — twice. ... It's something I thought we really needed to do," Nationals general manager Mike Rizzo said.
He missed the final 3½ months of the 2008 season, then allowed 23 runs in six innings over three starts when he returned last season. He went back on the disabled list, returned in late May to make three relief appearances and six starts before his season was ended by shoulder pain. Dr. James Andrews repaired a tear in the right shoulder capsule.
"The hardest part for me going through the process was that right after the surgery, I had to start over," Wang said through translator Alan Chang. "I had to start everything from ground zero, building everything up again step by step. It's a very trying process, a hard process.
"My No. 1 goal is to return to be among the best pitchers in Major League Baseball," he said. "I'll do everything possible to make myself stronger and give myself every chance possible."
Wang will return to Phoenix to continue his offseason rehabilitation before rejoining the Nationals on March 7 in Viera, Rizzo said. From there, Wang's progress will dictate how quickly he accelerates baseball activities.
Several minor league rehabilitation starts are likely and when asked when Wang would be ready to pitch in the majors, Rizzo said: "We're expecting, optimistically, that sometime between the first of May and the first of June. We're going to be cautious with him because he's a long-term asset for us."
Notes: To make room for Wang on the 40-man roster, the Nationals placed RHP Jordan Zimmermann on the 60-day disabled list. Zimmermann is recovering from ligament replacement surgery performed in July 2009.