Determining the mechanical properties of brain tissues is essential in the field of brain biomechanics. In this paper, we use ultrasound-based shear wave elastography to measure both in vivo and ex vivo elastic properties of brain tissues. Our results demonstrate that the shear modulus from in vivo measurements is about 47% higher than that given by the ex vivo measurements (p value = 0.0063). The change in ex vivo elastic properties within 60-min post-mortem is negligible. The results also show that within 60-min post-mortem and in a temperature range of 37–23 °C, the elastic properties of brain tissues approximately linearly depend on the temperature in both cooling and re-heating processes.