Glimpsed in the half-light of a London evening, the figure may just have passed for female. She emerged cautiously from a doorway and folded herself into a battered red car. There were a few companions – among them a grim-visaged man with Nordic features and a couple of nerdy youngsters. One seemed to have given the old woman her coat.

The car weaved through the light Paddington traffic, heading north in the direction of Cambridge.

There was no obvious sign of pursuit. Nonetheless, they periodically pulled off the road into a lay-by and waited – lights killed – in the gloom. By 10pm they reached the flatlands of East Anglia, a sepia landscape where the occasional disused sugar factory hulked out of the blackness.

Fifteen miles inland, at the village of Ellingham, they turned left. The car skidded on a driveway, and drove past an ancient dovecote before stopping in front of a grand Georgian manor house. The woman stepped from the car. There was something odd about her.

Close up, it was obvious that this strange figure was Julian Assange, his platinum hair concealed by a wig. At more than 6ft tall, he was never going to be a very convincing female. "You can't imagine how ridiculous it was," WikiLeaks's James Ball later said. "He'd stayed dressed up as an old woman for more than two hours." Assange was swapping genders in a pantomime attempt to evade possible pursuers.

In a breathtakingly short time, WikiLeaks had soared out of its previous niche as an obscure radical website to become a widely known online news platform. Assange had published leaked footage showing airborne US helicopter pilots executing two Reuters employees in Baghdad, seemingly as if they were playing a video-game. He had followed up this coup with another, even bigger sensation: an unprecedented newspaper deal, brokered with the Guardian in London, to reveal hundreds of thousands of classified US military field reports from the wars in Afghanistan and Iraq, many of them damning – and the biggest leak, a deluge of diplomatic cables from US embassies worldwide, was yet to come.

Date with danger

The unusual Australian who, in 2006, wrote up his dating profile for the OKCupid website using the name Harry Harrison. He was 36 years old, 6ft 2ins tall and, said the site's online test, "87% slut." He began: "WARNING: Want a regular, down to earth guy? Keep moving ... I am DANGER, ACHTUNG!"

Harry described himself as "variously professionally involved in international journalism/books, documentaries, cryptography, intelligence activities, civil rights, political activism, white collar crime and the internet". "A pig headed activist intellectual," he was seeking "siren for love affair, children and occasional criminal conspiracy".

His gallery of photographs showed a man with pale skin, sharp features and wind-blown silver-grey hair. In some he has a half-smile, in others he stares down the barrel of the camera.

Harry Harrison was a pseudonym, and the person behind the mask was Julian Assange, a computer hacker living in a crowded student house in Melbourne, dreaming up a scheme for an idealistic information insurgency which was eventually to become celebrated – and execrated – worldwide as WikiLeaks. Assange had a striking and, some critics would say, damaged personality. It was on peacock display in this dating profile, but probably rooted deep in his Australian childhood and youth.

His obsession with computers, and his compulsion to keep moving both seemed to have their origins in his restless early years. So too, perhaps, did the rumblings from others that Assange was on the autistic spectrum. Assange would himself joke, when asked if was autistic: "Aren't all men?".

His dry sense of humour made him easy to like and attractive – perhaps too attractive – to women. And there was his high, analytical intelligence. In a different incarnation, Assange could perhaps have been the successful chief executive of a corporation.

There were a few demerits OKCupid left out. Assange's social skills could seem lacking. The way his eyes flickered around the room was curious; one Guardian journalist described it as "toggling". And occasionally he forgot to wash. Collaborators who fell out with him – there was to be a long list – accused him of imperiousness and a callous disregard for those of whom he disapproved. Certainly, when crossed, Assange could get very angry indeed, his mood changing instantaneously. But in one way the OKCupid profile proved to be dizzyingly accurate. Four years later, in 2010, nobody would be left in any doubt that Assange really did mean DANGER, ACHTUNG!

Julian was born on 3 July 1971 in Townsville, in the state of Queensland, in Australia's sub-tropical north. His mother, Christine, was the daughter of Warren Hawkins, described by colleagues as a rigid and traditionalist academic who became a college principal; the family settled in Australia from 19th-century Scotland.

Julian's biological father John Shipton is absent from much of the record: at 17, Christine abruptly left home, selling her paintings to buy a motorcycle, a tent and a map. Some 1,500 miles later she arrived in Sydney and joined its counter-culture scene. She fell in love with Shipton, a rebellious young man she met at an anti-Vietnam war demonstration in 1970. The relationship ended and he would play no further role in Assange's life for many years.

They had no contact until after Assange turned 25. Later they met, with Julian discovering he had inherited his architect father's highly logical and dispassionate intellect. One friend said Shipton was "like a mirror shining back at Julian". Assange believed he had inherited his "rebel gene" from his unconventional father. In 2006, at the start of Julian's remarkable mission to uncover secrets, he registered the wikileaks.org domain name under Shipton's name.

After the birth of her child, Christine moved as a single mother to Magnetic Island, a short ferry ride across the bay from Townsville. She married Brett Assange, an actor and theatre director. Their touring lifestyle was the backdrop to Assange's early years. His stepfather staged and directed plays and his mother did the make-up, costumes and set design.

During his childhood Assange attended 37 different schools, emerging with no qualifications whatsoever. "Some people are really horrified and say: 'You poor thing, you went to all these schools.' But actually during this period I really liked it," he later said.

After her relationship with Brett Assange broke down, Christine became tempestuously involved with a third, much younger man, Keith Hamilton, an amateur musician and a member of a New Age group, the Santiniketan Park Association. He was also, according to Assange, a manipulative psychopath.

"My mother became involved with a person who seems to be the son of Anne Hamilton-Byrne, of the Anne Hamilton-Byrne cult in Australia," said Assange, "and we kept getting tracked down, possibly because of leaks in the social security system, and having to leave very quickly to a new city, and lived under assumed names." For the next five or six years, the three lived as fugitives.

When Assange was 13 or 14, his mother had rented a house across the street from an electronics shop. Assange began going there and working on a Commodore 64. His mother saved to buy the computer for her older son as a present. Assange began teaching himself code. At 16 he got his first modem.

He attended a programme for gifted children in Melbourne, where he acquired "an introverted and emotionally disturbed" girlfriend, as he put it. Assange grew interested in science and roamed around libraries. Soon he discovered hacking.

Underground: Tales of Hacking, Madness & Obsession on the Electronic Frontier appeared in 1997. Published under the byline of Suelette Dreyfus, a Melbourne academic, Assange is credited as researcher, but his imprint his palpable – in parts it reads like an Assange biography. The book depicts the international computer underground of the 90s: "A veiled world populated by characters slipping in and out of the half-darkness. It is not a place where people use their real names." Assange chose an epigraph from Oscar Wilde: "Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth."

"[He] went to school," runs the story in Underground. "Often he didn't. The school system didn't hold much interest for him. It didn't feed his mind … The Sydney computer system was a far more interesting place to muck around in than the rural high school."

High-level hacking

By 1991 Assange was probably Australia's most accomplished hacker. He and two others founded International Subversives magazine, offering tips on "phreaking" – how to break into telephone systems illegally and make free calls. The magazine had an exclusive readership: its circulation was just three, the hackers themselves.

In the spring of 1991, the three hackers found an exciting new target: MILNET, the US military's secret defence data network. Quickly, Assange discovered a back door. He got inside. "We had total control over it for two years," he later claimed. The hackers also routinely broke into the computer systems at Australia's National University.

But he suspected Victoria police were about to raid his home. According to Underground: "He wiped his disks, burnt his printouts, and left" to doss temporarily with his girlfriend. The pair joined a squatters' union, and when Assange was 18 she became pregnant. They married and had a baby boy, Daniel. But as Assange's anxiety increased, and police finally closed in on his outlaw circle of hackers, his wife moved out, taking their 20-month-old son Daniel with them. Assange was hospitalised with depression. For a period he slept outdoors, rambling around the eucalyptus forests in Dandenong Ranges national park; he would wake up covered in mosquito bites.

But it wasn't until 1994 that he was finally charged, with the case only being heard in 1996. He pleaded guilty in Melbourne's Victoria County Court to 24 counts of hacking. The prosecution described Assange as "the most active" and "most skilful" of the group, and pressed for a prison sentence. Assange's motive, according to the prosecution, was "simply an arrogance and a desire to show off his computer skills".

At one point Assange turned up with flowers for one of the prosecution lawyers, Andrea Pavleka (described in Underground as "tall, slender and long-legged, with a bob of sandy blonde curls, booky spectacles resting on a cute button nose and an infectious laugh"). It was a courtly gesture. Assange's lawyer felt obliged to point out to Assange: "She doesn't want to date you, Julian. She wants to put you in jail."

The judge said he regarded Assange's offences as "quite serious". But there was no evidence to suggest he had sought personal gain. Rather than a malicious hacker, he had acted, the judge said, out of "intellectual inquisitiveness".

Assange considered himself the victim of an injustice. He later quoted Solzhenitsyn's First Circle: "To feel that home is the camaraderie of persecuted, and in fact, prosecuted, polymaths in a Stalinist slave labour camp! How close the parallels to my own adventures! … Such prosecution in youth is a defining peak experience. To know the state for what it really is! To see through that veneer the educated swear to disbelieve in but still slavishly follow with their hearts! … Your belief in the mendacity of the state … begins only with a jackboot at the door. True belief forms when led into the dock and referred to in the third person. True belief is when a distant voice booms 'the prisoner shall now rise' and no one else in the room stands."

Convicted but leniently treated, Assange was now an unemployed father in Melbourne surviving on a single parent pension. The family courts had given him sole custody of his son.

Assange drafted on his bravely named blog, IQ.org, an apparently fanciful theory for overthrowing injustice in the world: "The more secretive or unjust an organisation is, the more leaks induce fear and paranoia in its leadership and planning coterie … Since unjust systems, by their nature, induce opponents, and in many places barely have the upper hand, mass leaking leaves them exquisitely vulnerable to those who seek to replace them with more open forms of governance."

Assange spoke of a high-flown calling: "If we can only live once, then let it be a daring adventure that draws on all our powers … Men in their prime, if they have convictions, are tasked to act on them."

He told potential supporters about his secret new plan: "This is a restricted internal development mailing list for w-i-k-i-l-e-a-k-s-.-o-r-g. Please do not mention that word directly in these discussions; refer instead to 'WL'." On 9 December 2006, an email signed "WL" also arrived out of the blue for Daniel Ellsberg, the whistleblower of Vietnam war renown.

The hacker underground was only one part of the soil out of which WikiLeaks grew. Another was the anti-capitalist radicals – the community of environmental activists, human rights campaigners and political revolutionaries who make up what used to be known in the 1960s as the "counter-culture". As Assange went public for the first time about WikiLeaks, he travelled to Nairobi in Kenya to set out their stall at the World Social Forum in January 2007.

He was so exhilarated by what he called "the world's biggest NGO beach party" that he stayed on for much of the next two years in a Nairobi compound with activists from Médecins Sans Frontières and other foreign groups.

Kenyan breakthrough

It was Kenya that gave WikiLeaks its first journalistic coup. A massive report about the alleged corruption of former president Daniel Arap Moi had been commissioned from the private inquiry firm Kroll. But his successor, President Mwai Kibaki, who commissioned the report, subsequently failed to release it, allegedly for political reasons.

"This report was the holy grail of Kenyan journalism," Assange later said. "I went there in 2007 and got hold of it." The actual circumstances of publication were more complex.

The report was leaked to Mwalimu Mati, head of Mars Group Kenya, an anti-corruption group. "Someone dumped it in our laps," he said. Mati, prompted by a contact in Germany, had previously registered as a volunteer with WikiLeaks. The fear of retribution made it too dangerous to post the report on the group's own website: "So we thought: can we not put it on WikiLeaks?" The story appeared simultaneously on 31 August on the front page of the Guardian in London. The full text of the document was posted on WikiLeaks' website headed, "The missing Kenyan billions". A press release explained, "WikiLeaks has not yet publicly 'launched'. We are open only to submissions from journalistic and dissident contacts. However, given the political situation in Kenya we feel we would be remiss to withhold this document any longer." The site added: "Attribution should be to … 'Julian A, WikiLeaks's spokesman'." He later published another report: "The Cry of Blood – Extra-Judicial Killings and Disappearances". It was based on evidence obtained by the Kenyan National Commission on Human Rights.

Four people associated with investigating the killings were themselves subsequently murdered, including human rights activists Oscar Kingara and John Paul Oulu.

Assange and his group were by now starting to see a flow of genuinely leaked documents, including some from UK military sources. But Assange had by now discovered, to his chagrin, that simply posting long lists of raw and random documents on to a website failed to change the world. "Our initial idea was, 'Look at all those people editing Wikipedia. Look at all the junk that they're working on," he wrote.

"Surely all those people that are busy working on articles about history and mathematics and so on, and all those bloggers that are busy pontificating about … human rights disasters … surely those people will step forward, given fresh source material, and do something?' No. It's all bullshit. It's all bullshit. In fact, people write about things, in general (if it's not part of their career), because they want to display their values to their peers, who are already in the same group. Actually, they don't give a fuck about the material."

Assange would have to carry on hunting for a WikiLeaks model that could both bring in working revenue and gain global political attention.