OTTAWA — In something resembling a bottle return program, Detroit’s enormous petroleum coke pile, a byproduct of Canadian oil sands, is making its way back to Canada.

A Canadian electrical power plant, owned by Nova Scotia Power, is chipping away at the three-story-high, blocklong pile of petroleum coke on Detroit’s waterfront. The company is burning the high-carbon, high-sulfur waste product because it is cheaper than natural gas.

The uncovered black pile, which has angered and upset some residents of Detroit as well as others across the river in Windsor, Ontario, began appearing this year. Owned by Koch Carbon, a company that is controlled by the industrialists Charles and David Koch, it is a byproduct of processing heavy bitumen piped from the oil sands in Alberta to a Detroit refinery.

Its final destination had been something of a mystery. Most petroleum coke, often referred to in the oil industry as petcoke, is used as inexpensive fuel in countries like China, India and Mexico with relatively loose emissions controls. Environmentalists were concerned not only about the impact of the growing pile in Detroit but also about where the material would be burned.