The U.S. Justice Department has decided not to sue former Countrywide Financial Corp. Chief Executive Angelo Mozilo and others over their alleged role in the financial crisis and will close its civil investigation of them, according to people familiar with the matter.

The decision comes five years after prosecutors closed a similar criminal probe. Later, the U.S. attorney’s office in Los Angeles opened a related civil fraud investigation into the former head of the mortgage giant, amid much criticism of prosecutors for bringing...