The failure mechanism of plasma-facing components (PFCs) under extreme plasma conditions relevant for fusion reactor were investigated. Here, edge-localized mode (ELM)-like transient thermal shock irradiation experiments were performed on tungsten and molybdenum using compressed plasma flow, and combined with thermal-mechanical analysis by means of finite element simulations to discuss the grain structure evolution, cracking behavior and variations of hardness. When ELM-like thermal shock irradiation was sufficient to melt tungsten and molybdenum, submicron-sized cellular sub-grain structure created on their surface due to the high temperature gradient of the molten layer under the effect of the Bénard-Marangoni instability. Rapid directional solidification from the bottom of the molten layer to the surface induced the formation of columnar grains dominated by <200> orientation. While the formation of cellular sub-grains increased hardness, the thermal effect of irradiation and the formation of columnar grains led to softening. The high thermal stress induced by the ELM-like thermal shock produced macro-cracks and micro-cracks on the surface of tungsten and only micro-cracks on the surface of molybdenum. Macro-cracks generated due to the intrinsic brittleness of tungsten. As a result of stress evolution, longitudinal macro-cracks extending perpendicular to the surface experienced transverse transformation within the material. Micro-cracks formed due to the embrittlement of the re-solidification zone, and their width increased with the melting depth. These results help to understand failure mechanisms in PFCs under extreme operation conditions which are valuable for developing future fusion reactors.