Yet behind closed doors, Steve Jobs could be a sexist bully, a skinflint and a pathological liar who behaved appallingly, according to a forthcoming memoir by the first girlfriend of the Apple boss.

In a candid account of their on-off relationship through the 1970s, Chrisann Brennan, the mother of Jobs’s eldest child, depicts an “emotional vortex” of a man badly scarred by his childhood.

The Apple chief, who died of pancreatic cancer in 2011 at the age of 56, is repeatedly accused of wrongdoing in The Bite in the Apple, due to be published in the United States this month.

The memoir tells the full story of how one of the most accomplished captains of American industry often behaved like a spoilt brat.

Miss Brennan’s disclosures about Jobs’s behaviour could reignite a simmering dispute with his family. Her invitation to Jobs’s memorial service at Stanford University was withdrawn after she co-operated with Rolling Stone magazine on an article about their relationship.

The book, subtitled A Memoir of My Life with Steve Jobs, has returned the late Apple chief to the pages of America’s tabloids in recent days with extracts published in the New York Post. It is due to be published in hardback in Britain by St Martin’s Press on Nov 1.

According to Miss Brennan, a painter and graphic designer who lives in Monterey, California, Jobs was a “brilliant misfit”, convinced he was going to die young, who became “positively despotic” over time. “As Apple grew, so did Steve’s sense of self-entitlement,” she writes.

A cute tale he would later tell, about colleagues at Atari computers in the early 1970s not wanting to work the same shift as him because he smelled bad, is untrue, Miss Brennan claims. In fact, “I had heard that he was moved to the night shift because his co-workers found him so dark and negative,” she writes.

The couple met as pupils at Homestead High School in Cupertino, California, the city in the foothills of the Santa Cruz Mountains in which Apple’s headquarters, at 1, Infinite Loop, remains today. They went on to live together as Jobs and a friend co-founded the company from a garage.

However, he ended the five-year relationship just as the firm was taking off and when Miss Brennan became pregnant with their child. Jobs denied being the father of the couple’s daughter, Lisa, for years after she was born in 1978.

“Steve’s face turned ugly,” she said of the moment she told him she was pregnant. “He gave me a fiery look. Then he rushed out of the house without a word.”

The denials persisted for several years. Jobs at one point accused Miss Brennan of “stealing my genes”, which he saw as a valuable commodity, and failed to visit for three days after she gave birth.

At the same time, he continued to aggressively dispute the notion that he was Lisa’s father, even recruiting lawyers to draw up plans of Miss Brennan’s house to show how other men might have been visiting her.

Yet a DNA test proved Jobs wrong, prompting him to agree to pay about $500 (£300) each month in child support, shortly before the flotation of Apple stock made him millions.

Lawyers who worked with Jobs at Apple at the time later told Miss Brennan that he and his colleagues had celebrated extravagantly after he escaped having to pay more towards his daughter’s upkeep.

Miss Brennan dates this hostile attitude towards women to a transformational trip that Jobs took in 1974 to India with Daniel Kottke, a friend and collaborator on the first Apple computer, after the pair of 20-year-olds became captivated by the book Be Here Now by the American guru known as Ram Dass.

Before he died, Jobs said his work had been influenced deeply by his seeing how the people of the Indian countryside relied more on intuition than intellect. The formative trip is depicted in several key scenes of Jobs, the Hollywood biopic that was released this year.

The sojourn also helped him “see the craziness” of the Western world, and turned him on to Eastern mysticism, he later said. However, according to Miss Brennan, Jobs also returned from his visit a “bewildered lunatic shaman” and fully-fledged sexist bully.

Having come back covered in bed-bugs and full of parasites, Jobs declared to her that “if women were good, they wouldn’t experience labour pain”, and compared women to “a snake in the grass”.

He also “started to reject the feminine aspect as inferior to the glorious masculine”, and became markedly more sexually aggressive, his former girlfriend said.

“It all broke open between us when he asked if I would make tantric love with him in his garden shed,” said Miss Brennan. She felt neither was spiritually prepared and “the only word I had was an emphatic 'no’”.

After she arrived at his parents’ home late one night around this time, Jobs even demanded that she strip naked in the garden so that he could scrub her with peppermint soap before hosing her down.

The couple “shared nights of lovemaking so profound that, astonishingly, some 15 years later, he called me out of the blue to thank me,” she said. However, Jobs was so concerned about saving “energy for work” and “conserving one’s vital energies” that he preferred not to climax.

Colleagues have recalled widely how Jobs drove staff at Apple into the ground with his exhausting demands, his refusal to compromise on his vision and his furious criticism of those he considered inferior or incompetent.

Yet this extraordinary behaviour appeared to have been partly rooted in some surprisingly ordinary incidents from childhood, according to Miss Brennan.

One such source of pain is disclosed to be the moment that Jobs was told by his adoptive parents as a young boy that Father Christmas did not exist. “I was so mad that they had lied to me,” he complained, in a remark that she says he repeated “on several occasions”.

Another came when, at five, he was deserted briefly by his adoptive mother, Clara, “who had taken his sister Patty indoors and left Steve outside, alone on the swings”.

Crucially, Miss Brennan explains that this “played utter havoc on the psyche of a little boy who felt he’d been abandoned once already by his birth parents”. Indeed, the most scarring incident to Jobs was this original wrangling over his fate.

After his biological mother give him up for adoption, she changed her mind about the suitability of his new family. While her objections were eventually defeated, Jobs was left in limbo for months.

Jobs also became interested in primal scream therapy and once asked Miss Brennan to cry “Mommy, Daddy, Mommy, Daddy” after they had taken LSD, because “he thought he was fit to oversee that kind of opening up in me just from having read a book”.

However, his icy streak remained, according to Brennan, recalling his obnoxiousness while eating out. “Steve would run down the wait-staff like a demon,” she writes, “detailing the finer points of good service, which included the notion that they 'should be seen only when he needed them’.”

He had a tendency to tell anecdotes about his past that friends knew could not be true, before they realised that these were tales appropriated from the lives of other friends.

Despite Apple’s rise, Jobs was fired from the empire he had founded at just 30, following a dispute with the company’s chief executive amid poor sales of the Macintosh computer. The humbling blow is said to have softened him slightly.

However, he never lost his distinctive drive and remarkable self-belief, and resumed his exacting leadership when he returned to a beleaguered Apple in 1997. Eventually, Miss Brennan says, she came to understand that Jobs’s mood swings and behaviour fuelled a brilliant career in business.

“I began to perceive that awesome and awful could be but a hair’s breadth apart,” she writes.

After acknowledging paternity for Lisa, Jobs forged a close relationship with his daughter and she lived with him as a teenager. He paid for her to attend Harvard and she is now a magazine writer.

Brennan’s tell-all memoir offers Jobs’s millions of devotees a more candid account of his shortcomings than some of the more enthusiastic biographies written in recent years. While Steve Jobs, the authorised biography published shortly after his death, contained some criticism from friends and family, it was based largely on 40 interviews with Jobs himself.

Meanwhile in The Steve Jobs Way Jay Elliott, a former Apple vice-president, said his former boss was “in a class by himself” when it came to management skill.

Jobs, who left an $8 billion fortune, married Laurene Powell in 1991. They had three children.