The 32-year-old has signed a short-term deal that will keep him at the club until January, having been out of contract since leaving Crystal Palace in the summer.
The move sees the 65-time Morrocco international reunite with manager Neil Warnock after the pair worked together at Selhurst Park.
"I worked for [Warnock] at Crystal Palace before and I'm happy and proud to work with him here at Cardiff City FC," Chamakh told the club's official website.
"Cardiff are a side that should be on top and I think we can improve going forward. I'm looking forward to meeting with my new teammates and getting started. I can't wait to score for my new team."
Warnock added: "We've signed Marouane on a short-term deal until January to assess his fitness. He's a versatile player with pedigree and somebody who impressed me during my time at Crystal Palace."