The Justice Department has warned Apple Inc. and five of the biggest U.S. publishers that it plans to sue them for allegedly colluding to raise the price of electronic books, according to people familiar with the matter.

Several of the parties have held talks to settle the antitrust case and head off a potentially damaging court battle, these people said. If successful, such a settlement could have wide-ranging repercussions for the industry, potentially leading to cheaper e-books for consumers. However, not every publisher...