The two governments have had a rocky relationship over the years. They clashed over Ontario's representation in the House of Commons, with the Liberal premier being dubbed by the federal Tories as the "small man of Confederation" when he criticized their plan to give the province just 11 more seats.
There were other spats over tax cuts, equalization and the province's $12-billion deficit.
But that was all water under the bridge Wednesday, as the two held a joint news conference — McGuinty's last as premier — to announce a new auto plant investment in Cambridge, Ont.
Harper lauded McGuinty for "concluding an extraordinarily long period of public service," speaking about the "very dark days" at the height of the 2009 recession when the two joined forces to bail out Ontario's beleaguered automakers.
"I hope that with the new premier, we will continue the close working relationship that Dalton and I have had over the past several years," he said.
That doesn't mean there won't be differences between the two, whether it's rooted in the offices they hold or the parties they represent, Harper added.
"One of the little secrets of politics is that once you're burdened with the responsibilities of office, what you find is that all people who have those responsibilities, share a lot of the same things," he said.
"They share common challenges, they share common opportunities, they share common problems, common limitations. And I think it has been shown ... over the past several years that when governments work together, and particularly work together on the economy, the results are much better."
McGuinty, who has only a few days left before a new premier is chosen on Saturday, acknowledged that the two haven't always seen eye to eye.
"It's human nature for us to focus on what it is that distinguishes us by way of differences, but the fact of the matter is, we've also found a lot of common ground," he said.
While McGuinty received a sunny sendoff from Harper, his exit has been overshadowed by controversies, from angry teachers protesting forced contracts, to cancelled gas plants and an ongoing scandal at Ornge, Ontario's troubled air ambulance service. He is also leaving his office with the province facing an $11.9-billion deficit.
McGuinty defended his record, saying he's also leaving the top job with higher test scores in schools, some of the shortest health care wait times in the country, fewer smog days, tough drinking water standards and an economy that's growing again.
Money needed to be borrowed during the recession to save and create jobs, but his government is "doing what we need to do" to get Ontario out of the red, including freezing wages for public sector workers, McGuinty said.
"So my advice to my successor would be, let's not take our foot off the pedal when it comes to eliminating that deficit," he said.
As for his legacy, McGuinty said he'll let others worry about it.
"I'm just very proud to have had the opportunity to serve Ontarians, he said. "They are a magnificent, inspirational people, and I got a lot out of this experience and I'm grateful for it."
McGuinty promised to keep his seat in the legislature until the next general election. But other than that, he doesn't have any plans yet.
Maybe he'll ask Toyota to give him a job at their plant, he joked. His wife Terri also has a long list of tasks for him at home.
"I haven't really had any time to give that much thought," McGuinty said. "But one thing for sure, I will try to find some way to continue to make a difference for my province and for my country."
Also on HuffPost