Citing Conservative Party sources, the CBC and other media said MacKay will not seek re-election and will announce his decision at an event with Harper in Halifax, Nova Scotia, later today.
The departure of MacKay, 49, is the latest setback for Harper, who is in a tight three-way race with opposition parties in the runup to October's election. Foreign Affairs minister John Baird resigned unexpectedly in February.
MacKay, an MP from Nova Scotia, was previously defence minister and foreign affairs minister, and was the face of the tough new security law Harper introduced this year. The Conservatives have touted their security credentials as a key campaign platform ahead of October's election.
Harper and MacKay were both hawks on the war in Afghanistan and on the current Canadian engagement in the fight against Islamic State. They also moved in lockstep to ratchet up the power of intelligence agencies in the wake of two attacks on Canadian soil last year, including an attack on Parliament in Ottawa.
Polls show a tough-on-security stand and Harper's economic leadership are strong points for the Conservatives, who have been in power since 2006. But their popular support has waned as voter fatigue has set in, and victory in October is far from assured.
In May, the long-dominant Conservative government in oil-rich Alberta, Harper's home province, was thrown from office by a surge of support for the left-wing New Democratic Party, which also threatens federally.
"They have been weakened, that's the main reason these guys are leaving," said University of Toronto political science professor Nelson Wiseman.
While no reason for his resignation has yet emerged, analysts said the combination of MacKay's young family and the unlikelihood that Harper will step aside to make room for a new leader was likely behind the move.
"It has been clear for a while that Harper is not stepping down, it could be [MacKay and Baird] each had a thought they had a crack at becoming leader," Wiseman said.
Harper, 56, is considered more right wing than MacKay and has maintained strict control over his government, leaving cabinet ministers little room to assert themselves independently.
A former senior Conservative official said MacKay may be quitting now to focus on his young family, and then return to politics later when the Conservative Party is ready to move closer to the center of the political spectrum.
"He is going to get out and make money and six or seven years down the road, when people want more of a progressive Conservative government, he'll be there," said the official, who declined to be named.
While MacKay's departure removes a potential rival to Harper from the scene, it also deprives the party of one of its most popular figures. MacKay's cheerful easy-going nature, always happy to plunge into a crowd and shake hands, has contrasted with Harper's more reserved demeanor.
A member of a powerful political family in Nova Scotia, MacKay was elected to federal office at age 31 and is one of the founders, with Harper, of the modern Conservative Party. The two men led the 2003 merger of two right-wing parties that had split the conservative vote. The united party went on to election victory in 2006 and has governed since.
MacKay's office could not be reached immediately for comment.
In February, MacKay told Reuters he was working hard to balance the needs of his young family and a demanding political career.
"I'm trying to strike that balance," he said. "I can assure you it's a challenge."
He and his wife are expecting a second child in the fall.
Updates 1:55 pm: More details, analysis added.