The 23-year old midfielder has signed a two-and-a-half-year deal with the Bluebirds after making 51 appearances for the Eagles.
O'Keefe, who arrived at Palace from Southend United in 2010, spent a short amount of time on loan with Blackpool last year and will reunite with former Selhurst Park teammates Danny Gabbidon and Kagisho Dikgacoi in south Wales.
"The club would like to thank Stuart for all his efforts during his time with Palace and wish him all the best in his future career."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!