Miller signed for Cardiff City on 26 July 2011, for a reported transfer fee of £870,000. Miller scored his first goal in the 91st minute of his debut match against West Ham United in the season opener. Miller returned to the score sheet, on 28 September, with a brace in a 2–1 win over Southampton. However, Miller suffered a groin injury in 10 minutes the following game against Hull City, which kept him out of two Scotland games and two Championship matches, where Cardiff only gained a point. On 19 October, manager Malky Mackay confirmed that Miller was fit and ready to make a return against Barnsley. Miller did return this match and scored the opener, but only lasted 30 minutes in the match after suffering a head injury. Miller scored in 1–0 victories against Birmingham City and Nottingham Forest in December. Cardiff reached the 2012 Football League Cup Final, but Miller missed a chance to score late in extra time. He then missed his penalty kick as Cardiff lost to Liverpool in a penalty shootout. He struggled for form later in the 2011–12 season, scoring only once in 22 appearances.