The Raiders have spent the last two seasons with Palmer under centre after recruiting him from the Cincinnati Bengals, but he has now been offloaded in favour of Flynn.
Flynn was drafted by the Green Bay Packers in 2008, signing for the Seahawks last year after impressing while briefly filling in for Aaron Rodgers.
But he was beaten to Seattle's starting job by rookie Russell Wilson and has now gone to Oakland in exchange for a fifth-round draft pick in 2014 and a conditional selection in 2015.
"I've known Matt Flynn since 2007 and scouted him before and after he entered the NFL," Oakland general manager Reggie McKenzie, who worked with Flynn in Green Bay, told his team's official website.
"Matt is a tough football player, and a talented quarterback. He will get the opportunity to compete to be a starter with the Raiders.
"I believe Matt has that potential, but I also know he hasn't had enough experience. We're going to let him compete and battle, and see what happens.
"We know Raider Nation wants a team that can compete for the playoffs year-in and year-out and we're putting in the necessary work right now to make that happen. This is one of the many decisions in that process."
The Cardinals have give up a 2013 sixth-rounder and a 2014 conditional pick in exchange for Palmer and a Raiders seventh-round pick this year.