The present study established a heat-stressed rat heart model, and used an H9c2 myocardial cell line to investigate the expression profiles of heat shock protein (Hsp)27 and αB-crystallin, both in vivo and in vitro. Rats and myocardial cells were subjected to 42 ˚C for 0, 20, 40, 60, 80 or 100 min, following which the mRNA and protein expression levels of Hsp27 and αB-crystallin were measured. Following heat shock, the protein expression levels of Hsp27 and αB-crystallin were significantly decreased in the rat heart cells in vivo, whereas their mRNA levels were significantly increased. The opposing association between the protein and mRNA expression levels of Hsp27 and αB-crystallin suggests that the progression from mRNA into proteins via translation may delayed, or proteins may exist as either oligomers or in the phosphorylated form under heat stress. In vitro, Hsp27 and αB-crystallin exhibited similar reductions in the protein levels at 40 and 60 min, then increased to normal values following 80 min of heat stress. However, the mRNA levels were not consistent with the protein levels. The mRNA levels of Hsp27 and αB-crystallin did however exhibit similar tendencies following 60 min of heat stress. The present study investigated these apparently conflicting results between the in vitro cell line and the in vivo body system. The results demonstrated that the protein and mRNA expression levels of Hsp27 and αB-crystallin exhibited similar trends in vivo and in vitro, respectively. These results were confirmed by analysis with STRING 9.1 software, which indicated that Hsp27 and αB-crystallin are co-expressed in rat myocardial cells. However, the individual cell lines and whole body system exhibited different trends in Hsp27 and αB-crystallin levels prior to and following heat stress, thus require further investigation.