TORONTO—Canada's top court has ruled in favor of Wal-Mart Stores Inc.'s Canadian unit regarding the closure of a unionized store in Quebec four years ago.

The Supreme Court of Canada, which heard the case in January, voted 6-3 for Wal-Mart Canada.

The store, located in the town of Jonquiere, made headlines in 2004 when it was unionized without...