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.
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?”
Since the vote to leave the EU the pound has fallen to its lowest since the 1980s, losing around 18% of its value against the US dollar, while Scotland’s First Minister Nicola Sturgeon has put in place plans for a second independence referendum if the UK leaves the single market.
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.