Amazon.com Inc. is taking to the high seas.

The online retail giant has begun handling shipment of goods by ocean to its U.S. warehouses from Chinese merchants selling on its site—taking on a role it previously left to global freight-transportation companies.

The move marks Amazon’s latest step in a multiyear effort to build out its delivery...