The deal is worth up to $5.85 million and includes a $200,000 bonus, according to a source.
"I always kept my eye on Dallas," McFadden told the team's website. "I figured whatever happened with DeMarco Murray's situation would have an impact on my situation. I feel like it worked out great for me."
In seven seasons with the Oakland Raiders, McFadden ran for 4,247 yards on 1,038 carries and 25 touchdowns. He also caught 211 passes for 1,769 yards and five touchdowns, but he has struggled with injuries throughout his career.
Last year was the first time in his career he played in all 16 games, but he became a backup for most of the season.
He started the season behind then-newly signed Maurice Jones-Drew, but McFadden became the starter when the now-retired Jones-Drew was injured and ineffective. Yet McFadden was ineffective and lost his job to Latavius Murray, who will be the Raiders' starting tailback in 2015.
McFadden, 27, has been working out at Michael Johnson Performance in McKinney, Texas.
He had 534 yards on 155 carries in 2014 and has averaged 3.4 or fewer yards per carry for the past three seasons. His 3.34 yards-per-carry average over the past three seasons is the second-lowest among qualified players behind Trent Richardson (3.31), who was recently released by the Indianapolis Colts, and just ahead of Jones-Drew (3.62).
The Cowboys are hoping that playing behind an offensive line that is considered one of the best in football -- and that features three Pro Bowlers in Tyron Smith, Travis Frederick and Zack Martin -- will finally see McFadden produce the way the Raiders expected when they took him in the first round of the 2008 draft.
The Cowboys selected McFadden's Arkansas running mate, Felix Jones, in the first round of the 2008 draft, but he had a difficult time staying healthy, didn't produce a 1,000-yard season, and eventually lost his job to Murray.
"It's a fresh start being here in Dallas," McFadden said. "Couldn't have been a better place."
ESPN.com Raiders reporter Bill Williamson contributed to this report.