Maersk Line and CSX Transportation signed a contract for the railroad to haul the Danish ocean carrier’s discretionary cargo from APM terminal in Portsmouth, Va., to the Midwest.