The recent progress with ruxolitinib treatment might improve quality of life as well as overall survival in patients with primary myelofibrosis. Therefore, the optimal timing of allogeneic hematopoietic cell transplantation (HCT) in the ruxolitinib era remains to be elucidated. We constructed a Markov model to simulate the 5-year clinical course of transplant candidates with primary myelofibrosis and compared outcomes between those who underwent immediate HCT and those whose HCT was delayed until after ruxolitinib failure. Since older age was associated with an increased risk of mortality, we analyzed patients aged <60 and ≥60 years separately in subgroup analyses. Life expectancy was consistently longer in the groups undergoing delayed HCT after ruxolitinib failure regardless of the patients' age. Regarding quality-adjusted life years, a baseline analysis showed that immediate HCT was inferior to delayed HCT after ruxolitinib failure (2.19 vs. 2.26). In patients aged <60 years, immediate HCT was equivalent to delayed HCT after ruxolitinib failure (2.31 vs. 2.31). On the other hand, in patients aged ≥60 years, immediate HCT was inferior to delayed HCT after ruxolitinib failure (1.98 vs. 2.21). A one-way sensitivity analysis showed that the utility of being alive without chronic graft-versus-host disease after immediate HCT was the most influential parameter for quality-adjusted life years, and that a value higher than 0.836 could reverse the superiority of delayed HCT after ruxolitinib failure. As a result, delayed HCT after ruxolitinib failure is expected to be superior to immediate HCT, especially in patients aged ≥60 years, and is also a promising strategy even in those aged <60 years.