Boris Johnson said the UK remaining in the EU would be a "boon for the world and for Europe", a previously unpublished newspaper column reveals.
He wrote the column in February, along with a pro-Brexit article that was later published in the Telegraph.
Mr Johnson subsequently became a leading figure in the campaign to leave the European Union.
The Sunday Times has published the pro-Remain column, which it says Mr Johnson wrote to clarify his thoughts.
In it he warned that Brexit could lead to an economic shock, Scottish independence and Russian aggression.
The foreign secretary had previously admitted to writing the piece but its contents had not been known.
The Sunday Times says he first wrote an article arguing the case to leave the EU, then wrote the pro-Remain piece "as a way of clarifying his thoughts", before composing a final article for publication backing Brexit.
Mr Johnson this week insisted the UK could get a trade deal that was "of greater value" to the economy than access to the EU single market, which he described as an "increasingly useless" concept.
But in the pro-EU article, revealed in a new book by Sunday Times political editor Tim Shipman, All Out War, he supported membership of the free trade zone.
"This is a market on our doorstep, ready for further exploitation by British firms," Mr Johnson wrote.
"The membership fee seems rather small for all that access. Why are we so determined to turn our back on it?"
Mr Johnson also warned that Brexit would cause an "economic shock" and could lead to the "break-up" of the UK.
He wrote: "There are some big questions that the 'out' side need to answer.
"Almost everyone expects there to be some sort of economic shock as a result of a Brexit.
"How big would it be? I am sure that the doomsters are exaggerating the fallout – but are they completely wrong? And how can we know?"
Mr Shipman said Mr Johnson's column contradicted positions he had adopted since joining the cabinet following Theresa May's appointment as prime minister.
But he said it also "dispels the myth that Johnson's case for remain was better than his argument to leave".
"In fact the article was dashed off quickly and seems to be an attempt by Johnson to convince himself the case for staying in was weak," he said.
Leave campaigners say pre-referendum forecasts of an immediate economic shock have failed to materialise, although critics of the Brexit vote point to the fall in the value of the pound against the dollar and the euro as evidence.
Former deputy prime minister Nick Clegg, who supported a Remain vote, suggested Mr Johnson and other "opportunists and chancers" backing Brexit had lied to the British people during the referendum campaign about the economic impact of Brexit.
"If I was a Brexit voter, I would feel increasingly betrayed that I voted in the belief that all these Brexiteers knew what they were doing," he told the BBC's Andrew Marr.
"I would feel 'I put my faith in Gove, Johnson and Farage' and I would be increasingly angry – particularly as my electricity and gas prices go up, as I realise I can't take my kids on that holiday to Spain because it is now 20% more expensive.
"I would be increasingly angry that these people, months after the referendum, still won't come clean about what they mean by Brexit."
Mr Clegg, who is part of a cross-party campaign urging a parliamentary vote on the UK's negotiating strategy, said having a "sensible and coherent plan" in place before beginning official talks would actually "strengthen" Theresa May's hand.
But International Development Secretary Priti Patel warned against MPs "using Parliament as a vehicle to subvert the democratic will of the British people".
She told Andrew Marr that MPs were already debating the government's strategy on a daily basis – pointing to two statements made by ministers during the past week.
"The job of the government is to deliver the the result of the referendum. The British people have spoken and we are going to deliver for them."
On Sunday, First Minister Nicola Sturgeon said she believed a deal could be reached which would allow Scotland to retain access to the European single market.
Speaking on the Andrew Marr Show, she said the UK leaving the EU need not entail Scotland being excluded from a separate trade arrangement.