Shearer was seen as a replacement for Dave Jones who was sacked after Cardiff lost to Swansea in the Championship play-off final, Shearer was seen as the number one candidate.
The former England captain said in a statement: "I can confirm that I was one of the candidates that the club spoke to about the vacant manager's position at Cardiff City.
"During these talks I was most impressed with the vision, ambition and determination of the owner Dato Chan Tien Ghee and the board.
"Unfortunately those talks were unsuccessful on this occasion.
"Cardiff City is a great club and I wish them every success next season."
