If you were a screenwriter or playwright pitching a drama about an eventful mid-20th-century life – a story along the lines of William Boyd's Any Human Heart, perhaps, but with a woman rather than a man at the centre – what would you come up with? Difficult childhood (sexual abuse). Becomes a New York fashion model. Goes to Paris and joins surrealist movement. Does photojournalism during second world war (is present for the liberation of Dachau; takes a bath in Hitler's abandoned house). Has first and only child at 40. Settles on a farm in Sussex. Reinvents herself as a gourmet cook.

Too implausible a storyline, surely. A woman who was a fashion icon, a surrealist and a war correspondent? But this was the life of Lee Miller – or, to borrow the title of Antony Penrose's 1988 book, The Lives of Lee Miller. Penrose, son of Miller and the British artist Roland Penrose, didn't find her an easy mother. She was often away and, because of depression and alcoholism, would be absent even when home. But since her death in 1977, he has been diligently preserving and collating her work. Discovered in the attic after her death, it consists of over 60,000 original negatives, 20,000 prints and contact sheets, and thousands of original documents and manuscripts. Until now, the website that showcases her archive has featured only a tiny fraction of this material. But from 23 April (Miller's birthday, as well as Shakespeare's), the site is being relaunched, with an online library featuring around 3,000 images, many never previously shown in public.

The NSBs, as the website calls these images (meaning Never Seen Befores), are fascinating for various reasons. First, there are her photos of artists. Picasso (who painted six portraits of her, the most memorable with a green mouth, breasts like sails, and a vagina resembling an eye), Man Ray, Cocteau. But also many others: Paul Eluard, Georges Braque, Virgil Thomson, Max Ernst, Yves Tanguy, Saul Steinberg, Henry Moore, Oskar Kokoschka. There's even one of Miró with Desmond Morris and a snake.

Nusch Eluard, Jean Cocteau and unknown man, Paris, France, 1944. Photograph: Lee Miller, © Lee Miller Archives, England 2013. All rights reserved.

Many of these are intimate and off the cuff. A second batch of NSBs are the more formal portraits Miller did for Vogue. There's a set of Dylan Thomas, fag in hand, on a tipped-back chair. Margot Fonteyn, beguiling in hat and gloves, looks over her left shoulder. The actress Gertrude Lawrence poses in front of a vase of dried flowers. There are also several intriguing shots of the young Dorothea Tanning, the surrealist painter who died last year at the age of 101. Back then, "A woman had to be a monster to be an artist," Tanning wrote, "and one who married another artist was branded – like a cow."

Tanning agreed to be branded, nevertheless, marrying Max Ernst. So did Miller, who after amicably divorcing her first husband, an Egyptian, married her lover of 10 years, Penrose, whose infatuation with her is evident in his photos – these are the third and in some ways most interesting tranche of NSBs. He portrays her in bed, one nipple prominent. Or crouching nymph-like by a stream. Or standing next to a statue of a goddess (for once, it's not Miller with the bare breasts). Best of all is his footnote to Picnic, Miller's famous 1937 photo of him with Eluard, Man Ray and their half-naked partners – a latter-day version of Manet's Le Déjeuner sur l'Herbe. Penrose's complementary photo, shot from the same angle and with the same empty bottle on the table, includes Miller smiling in the background – the mistress of misrule restored to the proceedings.

It's remarkable that Miller was able to delight in her body (and in the pleasure others took from it), given that she was raped, aged seven, while staying with family friends. She contracted gonorrhea as a result – a condition that, in the days before penicillin, was treatable only by daily douches and weekly inoculations, an agonising procedure for a small child. Miller's parents took her to see a psychiatrist, who advised her to treat love and sex as separate commodities. To a degree the advice succeeded. "Emotionally, I need to be completely absorbed in some work or in a man I love," she wrote, but she didn't see why going to bed with someone should upset whichever man she was currently in love with.

Strikingly beautiful, she was used to submitting to the male gaze. First there was her father, a keen amateur photographer who persuaded her to sit naked for him from the age of eight right into her 20s; then the publisher Condé Nast, who bumped into her, literally, in Manhattan, was struck by her looks, took her on as a model for Vogue, and made her the face of Kotex tampon adverts; then Man Ray, whose mistress and pupil she became (Madame Man Ray, as she was known in Paris). She was proud of her looks, but ultimately frustrated by life in front of the lens. "I looked like an angel, but I was a fiend inside," she said, looking back. Angry with her for taking lovers, and jealous of Cocteau for using her in his film The Blood of a Poet, Man Ray expressed his jealousy by doing violence to her face and body in his art.

A less spirited woman might have been crushed by these alpha males, but Miller, unfazed, determinedly transformed herself from passive model to active artist. First came her surrealist phase: she not only outmanned Man Ray in creating her own works, but was instrumental in the invention of the "solarisation" technique (a partial reversal of blacks and whites that creates a silvery aura). Then she set up a portrait studio in New York, with rich socialites her clientele.

A bombed chapel, 1940. Photograph: Lee Miller, © Lee Miller Archives, England 2013. All rights reserved.

Finally, after a more spiritual phase among pyramids and deserts, she moved from being Condé Nast's London fashion correspondent to war reportage, providing words as well as images from the battlefront. Some of her blitz photos retain a surrealist wit: a bombed chapel, with bricks pouring from its door, resembles a mouth with a tongue hanging out; a grounded, ovoid air balloon, with two geese in the foreground, is titled Eggceptional Achievement. But as the war progressed, and she followed the German retreat with increasing horror, playfulness no longer seemed apt. She took shots of a high-ranking Nazi and his family who had committed suicide; of an SS prison guard floating in a canal; and of the emaciated survivors and heaped-up dead of Buchenwald and Dachau ("I IMPLORE YOU TO BELIEVE THIS IS TRUE," she cabled Vogue).

In Munich, she was given the run of Hitler's house, by then under US control. Shedding her boots and uniform, she was photographed in his bathtub. It's a memorable picture, and one that can be read in various ways: as a celebration of the overthrow of a dictator; as a subversion of classical nude portraiture; and as an assertion of her own triumph in a male-dominated world.

On her return to London, she was feted. "Who else has written equally well about GIs and Picasso?" her editor said. "Who else can swing from the Siegfried line one week to the new hip line the next?" Desperate to ward off a sense of anticlimax, she returned to eastern Europe. But soon she was pregnant and finding the prospect of motherhood scarier than any front line. She missed the action, despite suffering post-traumatic stress. She also felt increasingly sidelined: in staid, patriarchal postwar Britain, her husband was the one in demand. Depressed at her loss of looks and gain in weight, she found solace in cooking elaborate meals for her guests at Farley Farm House in East Sussex, her home until her death in 1977. She could have written a very good cookbook.

The Sussex house remains home to her son, his family and the archive. Previously open only for occasional visits, it will now open for tours each Sunday until October. Lee Miller once wrote: "I keep saying to everyone, 'I didn't waste a minute all my life' – but I know myself, now, that if I had it over again, I'd be even more free with my ideas, with my body and my affection." Thanks to the online archive, her extraordinary achievement – and the ideas, body and affection behind it – will become even better known.

• The new Lee Miller Archive will be at leemiller.co.uk. Farley Farmhouse is at Muddles Green, Chiddingly, East Sussex. Details: farleyfarmhouse.co.uk