WASHINGTON -- The Justice Department opened an investigation of possible accounting fraud at Fannie Mae in the wake of a federal regulator's report that the mortgage giant may have manipulated its books to meet earnings targets.

The criminal investigation, still in a preliminary stage, is the latest in the government's intensifying scrutiny of the fourth-largest U.S. financial-services company. It follows an agreement between Fannie...