The plea agreement was announced Thursday in Newark, N.J., by U.S. Attorney Paul Fishman.
The German firm Columbia Shipmanagement and Cyprus-based Columbia Shipmanagement Ltd. agreed to pay a combined $10.4 million.
More than $2 million of the payments the companies make will go to preservation and protection efforts in shore areas hit by Superstorm Sandy.
In their guilty pleas, the shipping companies admitted bypassing required pollution prevention equipment and falsifying logs to hide their actions.
In one incident last spring, a ship was reported to have dumped five tons of oily waste in the waters off Costa Rica.
Fishman said crew members alerted authorities last year.