The Justice Department is preparing to file a lawsuit to block a proposed merger between Halliburton Co. and Baker Hughes Inc., the most recent sign that a takeover boom is meeting resistance from U.S. regulators and antitrust enforcers.

The suit could come at any time, according to people familiar with the matter. It would be the biggest challenge yet to the nearly $35 billion deal struck in 2014 to combine the world’s second- and third-largest oil-field services firms after Schlumberger Ltd.

...