George Osborne has admitted to "regrets" about his time in office and the "mistakes" that led to Brexit.
The former chancellor was a prominent figure in the ill-fated Remain campaign at the 2016 EU referendum, led by then prime minister David Cameron.
He said Mr Cameron's government had been "too late in the day" to explain the benefits of EU membership.
And, he told the BBC's Newsnight, it should not have set immigration targets it could not deliver.
"That led to a debate about how you might deliver those targets," he said, and the government "didn't make enough of the value of immigration".
That allowed a previously "minority concern" about leaving the EU and national sovereignty "to be linked to immigration control and that was pretty lethal in that referendum debate", he said.
Interviewed on Evan Davis's last Newsnight as presenter (you can watch the whole programme here), Mr Osborne said: "We were wrong to play into the debate that everything that Brussels did was a challenge and a battle and was wrong."
Mr Osborne was David Cameron's closest ally in government and served as his chancellor for the whole six years Mr Cameron was prime minister - from 2010 to 2016.
He has admitted in the past he was "not keen" on holding an EU referendum and had only gone along with it to support Mr Cameron.
During the campaign itself, he issued a series of warnings about job losses and tax rises if Britain left the EU, which critics attacked as scaremongering and Project Fear.
Mr Cameron launched the referendum campaign after spending weeks trying to strike a deal with the EU to curb immigration.
At the same time, his government was consistently failing to meet its own target - at a time when the home secretary was Theresa May - of reducing net migration to below 100,000 a year.
Mr Osborne told Newsnight: "We were too late in the day trying to explain some of the benefits of European Union membership.
"On immigration we were promising targets that we couldn't deliver and that then led to a debate about how you might deliver those targets - not that I see any evidence that they're going to be delivered in the future - but, you know, we definitely contributed to that argument, didn't make enough of the value of immigration.
"So I'm happy to look at mistakes we made."
Mr Cameron has yet to comment publicly on what went wrong in the Remain campaign.
Mr Osborne, who is now the editor of the London Evening Standard newspaper, in addition to a number of other post-politics jobs, said his other regrets included not focusing on fixing the banking system more quickly after the 2008 financial crash.
Mr Osborne, who became chancellor in 2010, when the Conservatives went into coalition with the Liberal Democrats, said: "Overall, faced with the gigantic financial crash and a set of difficult decisions in a hung parliament I think David Cameron, myself, Nick Clegg and others worked hard in what we felt to be the national interest to put things right in as fair a way as possible.
"Ultimately the country grew, jobs were created and we avoided the calamitous situation that a lot of European countries found themselves in this period."
Mr Osborne denied his austerity policies had encouraged people to vote for Brexit, saying that, for instance, many pensioners had favoured leaving the EU despite being "insulated" from austerity.
But he came under attack on the programme from Guardian columnist Polly Toynbee, who told him he had "done such harm and damage to this country".
Mr Osborne was also asked if he had any regrets over comments, attributed to him, that he would not rest until Prime Minister Theresa May was "chopped up in bags in my freezer".
"I certainly have said things in private which you know, I probably shouldn't have, and actually, apologised for it," he said.
"But I worked very hard all my life to make the Conservative Party electable, and it's painful to me to see it losing support in large areas of the country where it shouldn't be losing that support, particularly against, actually, a Labour opposition which I don't think is in a fit state at the moment."
But Mr Osborne warned Theresa May not to attempt to copy the policies of Jeremy Corbyn's party.
He said that the Conservatives lost their majority in 2017 by trying to "out-Ukip Ukip" and were not going to win the next election "by trying to out-Corbyn Corbyn".
"Trying to bang the nationalist drum doesn't actually work for modern conservativism and trying to outspend our political opponents isn't going to help the Conservatives either," he told Newsnight.