Prime Minister Stephen Harper is expected to name his replacement Wednesday.
Flaherty, who delivered his final budget last month, said he made the decision with his family earlier this year.
"As I begin another chapter in my life, I leave feeling fulfilled with what we have accomplished as a government and a country during one of the most challenging economic periods in our country's history," he said in a statement.
An official in the Prime Minister's Office said Flaherty would be retaining — at least for now — his seat in the House of Commons, meaning he remains an MP for the time being.
Flaherty is among Canada's longest-serving finance ministers, appointed to the key economic post when the Conservative government first came to power in 2006.
He managed the country's economy through one of its worst economic crises in 2008-2009, running up large deficits but leaving the books virtually balanced after his Feb. 11 budget.
Speculation about Flaherty's future has risen in recent years after he acknowledged suffering from a rare skin condition, requiring him to take medication that led to weight gain and apparent fatigue in public appearances.
His long farewell message to Canadians, delivered unexpectedly on a government website, listed accomplishments such as cooling the housing market and introducing tax-free savings accounts.
But he also made special mention of his policies to help Canadians with disabilities. "Our government has worked hard to ensure our country benefits from the talents and abilities of Canadians with disabilities," he said.
Harper, who has staked his government's reputation on steady economic management, said he regretted the loss of his No. 1 money man.
"It is with great reluctance that today I accepted the resignation from cabinet of Jim Flaherty, minister of finance, so that he can eventually return to the private sector," the prime minister said in a statement.
"In a political career of almost 20 years, minister Flaherty has exemplified the best qualities of those who enter public life: a true commitment to service, and a sincere desire to leave the country in better shape than it was when he entered politics."
New Democrat Leader Tom Mulcair acknowledged Flaherty's tenacity in a statement thanking him for his service to Canada.
"In the past year, Mr. Flaherty continued to serve in one of Canada's most difficult jobs despite facing health challenges. He did so with the same strength of character and sense of humour that has characterized his tenure as the finance minister of Canada," Mulcair said.
"Despite our disagreements about the best way to manage Canada's economy, I have always respected Mr. Flaherty's commitment to serving our country."
Flaherty was born in Lachine, Que., on Dec. 30, 1949. He went to Bishop Whelan High School and Loyola High School in Montreal and earned a BA at Princeton University and a law degree from York University's Osgoode Hall Law School.
In his law career, he was a founding partner of the firm Flaherty Dow Elliott before going into politics in 1990, when he ran and lost provincially in the riding of Durham Centre.
He ran again in 1995, and won a seat in the legislature.
The new member for Whitby-Ajax entered Mike Harris's cabinet in 1997 as minister of labour. He also served as minister of finance, attorney general, finance minister, enterprise minister and deputy premier under Harris and his successor, Ernie Eves.
In 2006, after two unsuccessful bids to lead the Ontario Conservatives, Flaherty jumped to federal politics, winning the riding of Whitby-Oshawa in the election that gave Prime Minister Stephen Harper and the Conservatives their first minority government.
Harper gave him the Finance portfolio.
Flaherty quickly embarked on a program that focused on tax cuts. He began in 2006 by cutting the GST by one percentage point to six per cent. He pared off another percentage point in 2008.
In 2006, he also announced changes to the tax rules governing income trusts which sparked anger and prompted special hearings by the Commons finance committee.
Flaherty kept coming up with ways for people to reduce their taxes.
In 2007, he introduced the Registered Disability Savings Plan to help Canadians with disabilities and their families save for retirement. One of Flaherty's three sons has a mental disability and the minister wept openly when he announced the plan.
In 2008, he announced the Tax-Free Savings Account, which allows people to earn tax-free investment income.
He repeatedly brought in targeted tax cuts to help everyone from truckers to people buying sports equipment. He raised the basic deduction to get more low income people off the tax rolls entirely, cut a point from the lowest personal tax rate and raised the upper limits of the two lowest tax brackets.
In his 2013 budget, he boasted that the average family of four was saving $3,220 in taxes compared with their bill in 2006.
While he was a strong fiscal conservative, Flaherty wasn't afraid to plunge into deficit with spending programs to stave off the effects of the 2009 recessions.
The balanced budgets of the Liberal years plunged deep into the red as Flaherty pumped in money to support infrastructure projects and keep the economy from stalling completely.
He pledged, however, to get the books in balance in time for the federal election expected in 2015, and came close this year in last month's budget, which carried only a $2.9-billion deficit with a $3-billion contingency fund.
Flaherty is married to Christine Elliott, also a lawyer and a politician. She ran and won provincially in Flaherty's old riding when he resigned to seek a federal seat, leaving the couple representing essentially the same region in the legislature and the Commons.
They have triplet sons — John, Galen and Quinn.Suggest a correction