A group including Apple Inc. and Dell Technologies Inc. surged to the front of a hotly contested race to acquire Toshiba Corp.’s memory-chip business, a crucial supplier to some of the world’s biggest makers of electronic gear.

Toshiba said Wednesday it had signed a nonbinding agreement with the leader of the group, private-equity firm Bain Capital, and intends to reach a deal by the end of September. The bid values the business at...