The Royals selected the contract of Madson, who is scheduled to make $850,000 this year. The Royals did the same for left-hander Franklin Morales, who has a $1.85 million Major League contract.
Flynn was optioned to Triple-A Omaha.
"Hardest roster decision I've had to make ever," Yost said. "Flynn did everything he could to make this team. He was fantastic in spring.
"But our gut just told us we can't let [Madson] go. He looks healthy. His fastball is up to 94 mph. He's a guy who can mix in with [Luke Hochevar] when he's healthy in the back of our bullpen."
Yost said although Madson hasn't been able to go on back-to-back days this spring, the Royals will find a way to utilize Madson.
"We'll try to protect everyone early," Yost said. "With our starters as sharp as they've been all season, we should be all right."
The club also placed left-hander Tim Collins and Hochevar on the 15-day disabled list -- Hochevar likely will begin a rehab stint this week in Omaha.
The Royals also assigned right-handed pitcher Joe Blanton, catcher J.C. Boscan, infielders Ryan Jackson, Whit Merrifield and Gabriel Noriega and outfielder Moises Sierra to Omaha.
The Royals have 40 players on their 40-man roster, including right-hander Kris Medlen, who is on the 60-day disabled list.
The rest of the Royals' 25-man roster:
Infielders: Mike Moustakas, Alcides Escobar, Omar Infante, Christian Colon, Eric Hosmer, and Kendrys Morales
Catchers: Salvador Perez and Erik Kratz
Outfielders: Paulo Orlando, Alex Gordon, Jarrod Dyson, Lorenzo Cain and Alex Rios
Starting pitchers: Yordano Ventura, Danny Duffy, Edinson Volquez, Jason Vargas, Jeremy Guthrie
Bullpen: Greg Holland, Wade Davis, Kelvin Herrera, Jason Frasor, Chris Young, Madson and Morales