Sarcomeres are fundamental to cardiac muscle contraction. Their impairment can elicit cardiomyopathies, leading causes of death worldwide. However, the molecular mechanism underlying sarcomere assembly remains obscure. We used human embryonic stem cell (hESC)-derived cardiomyocytes (CMs) to reveal stepwise spatiotemporal regulation of core cardiac myofibrillogenesis-associated proteins. We found that the molecular chaperone UNC45B is highly co-expressed with KINDLIN2 (KIND2), a marker of protocostameres, and later its distribution overlaps with that of muscle myosin MYH6. UNC45B-knockout CMs display essentially no contractility. Our phenotypic analyses further reveal that (1) binding of Z line anchor protein ACTN2 to protocostameres is perturbed because of impaired protocostamere formation, resulting in ACTN2 accumulation; (2) F-ACTIN polymerization is suppressed; and (3) MYH6 becomes degraded, so it cannot replace non-muscle myosin MYH10. Our mechanistic study demonstrates that UNC45B mediates protocostamere formation by regulating KIND2 expression. Thus, we show that UNC45B modulates cardiac myofibrillogenesis by interacting spatiotemporally with various proteins.