A top Wall Street law firm caught up in special counsel Robert Mueller’s investigation agreed to turn over $4.6 million it made from work it did for Ukraine in 2012 with former Trump campaign chairman Paul Manafort, according to an agreement with the Justice Department.

Skadden, Arps, Slate, Meagher & Flom LLP also agreed in a civil settlement to register as lobbyists for a foreign government in connection with that work, and acknowledged it misled the Justice Department when the agency initially asked the law firm about...