Following his release, Bamba trained with Derby County who were managed by his former Leicester boss Nigel Pearson but was not offered a deal. He instead joined Neil Warnock at Cardiff City in October 2016, signing a two-year contract. Warnock had long been keen on signing Bamba at previous clubs and had contacted him a month before the move, when both were without a club, and urged him to wait for Warnock's appointment at a new club to join him there. He made his debut for the club in a Severnside derby match against Bristol City on 14 October, scoring the winning goal as the "Bluebirds" won 2–1. His performances for Cardiff led manager Warnock to declare that "I wouldn't want anyone else. I don't think there's anyone better." Bamba received his first red card in seven years against Ipswich Town in December, following a scuffle with forward, David McGoldrick. After receiving the red card, Bamba clashed with the fourth official before being physically restrained by Warnock and leaving the pitch. His reaction led to a three match ban. In April, Bamba suffered a groin injury against Barnsley, which ended his season prematurely.