The former Newcastle boss has been one of the people considered for the vacant post, but announced in a statement he would not be taking up the role.
Shearer said: "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.
"Cardiff City is a great club and I wish them every success next season."