Hunter Harrison has sold his shares in Canadian Pacific Railway Ltd., shortly after quitting as chief executive officer of the Calgary company to pursue the top job at Florida-based railway CSX Corp.

Mr. Harrison has sold 178,617 CP shares owned by him and his wife at $150.80 (U.S.) each for a total $26.9-million ($35.3-million Canadian), according to a filing with the U.S. Securities and Exchange Commission. The amount represents all his common stock in CP, according to Ontario Securities Commission records. He is also entitled to another $16-million (Canadian) in equity-based payments, CP documents say, and a cash bonus for 2016 that has not been announced.

CP said on Jan. 18 that Mr. Harrison will depart the company at the end of January rather his planned retirement date of June 30, after the 72-year-old asked for permission to seek "opportunities involving other Class 1 railroads." Sources say Memphis-born Mr. Harrison is working with U.S. activist investor Paul Hilal's Mantle Ridge fund to seek the CEO role at CSX, a carrier that operates in the eastern half of the United States.

Story continues below advertisement

Read more: Harrison to exit CP with $52-million; non-compete pact silent on CSX (for subscribers)

Andrew Willis: Former CP chief takes one more railway ride (for subscribers)

From the archives: Turnaround ace: Inside the Hunter Harrison era at CP Railway

According to his separation agreement with CP, Mr. Harrison forgoes shares and payments worth $118-million and is required to sell all his CP shares by May 31. For 36 months, he is not allowed to work for Canadian National Railway Co., BNSF Railway or Union Pacific Railroad and cannot recruit any CP executive or manager, excluding the chief of staff.

Story continues below advertisement

CP has declined to make Mr. Harrison available. Mantle Ridge has declined to comment.

Mr. Harrison sold his CP shares when they are near a 52-week high in Toronto and New York, as railway stocks recover from the swoon of 2015, a year of plunging freight volumes.

While leading CP, Mr. Harrison tried to build a transcontinental railway by merging with CSX and, later, Norfolk Southern Corp., but was rebuffed by both companies.