Nineteen eighty-six was an eventful year for Dennis Hopper. After a fallow period, his Hollywood career was relaunched with the release of Blue Velvet, in which he played the mysterious gas-inhaling pimp and gangster Frank, with a sense of menace that seemed scarily real. When he was given the script, he told director David Lynch: "You have to let me play Frank because I am Frank."

That same year, his photographs were published in book form for the first time in a volume entitled Out of the Sixties. It went relatively unnoticed amid the media attention garnered by Blue Velvet, but it was a significant event for its creator. In a short preface, Hopper wrote: "These are my photos. I started at 18 taking pictures, I stopped at 31. I am 50 now. These represent the years from 25-31… They were the only creative outlet I had for those years until Easy Rider. I never carried a camera again. Thanks, Jack, for the book."

Easy Rider was the independent film, released in 1969, directed by and co-starring Hopper, that for a time changed the course of Hollywood film-making, signalling the beginning of what we now know as the alternative indie-film industry. Jack was Jack Woody, editor at Twelvetrees Press, who designed and published Out of the Sixties in a limited edition of 1,000 copies. For a long time, it was the only evidence of Hopper's short, but prodigiously creative, career as a photographer That career began when, following a famous row with director Henry Hathaway on the set of From Hell to Texas in 1958, he became persona non grata in Hollywood.

"He figured he was the greatest young actor in the world," Hathaway later recalled. "Well, he wasn't. He was a headstrong kid, full of dope and bullshit. He was a self-styled enfant terrible and a pain in the ass."

A still from inside a car. James Dean told Hopper to 'use the still full-frame'.

The clash with Hathaway cost Hopper his contract with Warner Brothers and brought about a long exile from Hollywood. Turning to photography out of desperation, for a time Hopper found a place where he could be utterly himself, untroubled by the compromises required by a collaborative process such as film-making and free from the constraints of the Hollywood studio system. With the success a decade later of Easy Rider, a low-budget, hippy road movie that flew in the face of Hollywood conventions, he would finally have his revenge on that system and on Hathaway in particular.

In the long years in between, though, he took photographs in order to survive creatively, if not financially. "I never made a cent from these photos," he said. "They cost me money but kept me alive."

As the Royal Academy's forthcoming exhibition Dennis Hopper: The Lost Album shows, the mercurial actor took to photography in his own instinctive and utterly obsessive way. Between 1961 and 1967, he shot around 10,000 images, using high-speed black-and-white film for immediacy, shooting only in natural light and never cropping his images. He made portraits of his fellow actors, including the young Paul Newman and Jane Fonda, and the artists he hung out with in Los Angeles, including Ed Ruscha, Robert Rauschenberg and Edward Kienholz.

He photographed Hells Angels, hippies and passersby as well as rioters in Sunset Strip in 1967 and protesters on the famous civil rights march from Selma to Montgomery, Alabama, in 1965. He shot Andy Warhol and his retinue at the Factory in New York in 1963 and a portfolio of rock stars – Brian Jones, the Grateful Dead, Jefferson Airplane, the Byrds and James Brown – for Vogue magazine in 1965.

That same year, he created the cover image for Ike and Tina Turner's River Deep – Mountain High album. He also photographed shop signs and storefronts for himself in a style reminiscent of the great Walker Evans and more abstract patterns in steel, wood and fabric that he spotted on his walks in Los Angeles and New York. "Through his eyes," says his longtime friend Ed Ruscha, "I can see a virtual dictionary of the City of Los Angeles."

Andy Warhol (bottom left) and members of the Factory, 1963.

Hopper was both of his time and ahead of it. "He was serious about photography and very ambitious," says Petra Giloy-Hirtz, curator of the new exhibition. "He was not an actor who dabbled in art and photography, but someone who expressed himself creatively through another related medium. The photographs offset the image of him as a mad, reckless, self-destructive hippy. That came later."

The exhibition comprises a cache of 400 original prints that Hopper made for his first photography show at the Fort Worth Art Centre Museum in Texas in 1970 and which have not been seen since. They were discovered after his death in 2010 in five dusty boxes among his belongings and extensive collection of art and antiques.

"The Lost Album is the title I gave to what is a treasure trove of evidence about Dennis and how he made images," says Giloy-Hirtz, who also edited the book of the same name last year. "The prints are much smaller than the ones we are used to seeing, just 6½in by 9½in. Some are creased or showing some wear and tear, but they carry an extraordinary sense of historical authenticity. I have tried to replicate the original show by using documentary photographs of it from the time, so this is as close to what Dennis would have wanted as is possible."

Roger Vadim and Jane Fonda at their wedding, Las Vegas, 1964.

It was his friend James Dean who first interested Hopper in photography. They bonded on the set of Dean's defining film, Rebel Without a Cause, and, according to Hopper, it was Dean who first noticed his eye for composition, telling him: "I know you're going to direct some day so learn to take photographs and don't crop them, use the still full frame." That advice, given by someone Hopper considered a mentor and a kindred spirit, would later help define Hopper's naturalistic style.

The disruptive behaviour that led to Hopper's banishment from Hollywood may have been precipitated in part by his grief at Dean's premature death in a car crash in 1955, just eight days after Hopper and he had finished working on Giant. Hopper got by for a time on small television roles and theatrical work but by 1960 he had also established himself as part of the fledgling contemporary art scene in Los Angeles, both as an artist and a collector. That scene centred around the Ferus Gallery in La Cienega Boulevard, founded in 1957 by the curator Walter Hopps and Edward Kienholz. Ed Ruscha tells me: "The art world in Los Angeles in the early 60s was minuscule: two or three galleries, and not many artists spread far and wide around the city. Dennis himself began to collect art and could be counted as maybe one of the four people in the movie business that had any interest in the art of the day."

"From the start, Dennis was very interested in what was happening in contemporary art," says the art dealer Irving Blum, who took over curating at Ferus in 1958. "When pop art broke in Los Angeles in 1961, he was one of the first people to pick up on it. I sold him one of the Campbell's soup cans for $100 in 1962. He bought some Lichtenstein landscapes before that when no one had even heard of pop. He saw the transparencies on my desk, and he just said, 'Yes! I want them.' You could tell he was someone with an understanding of the zeitgeist where art was concerned. He was utterly instinctive and absolutely on the money."

Ruscha concurs: "My very first sale of art was to Dennis Hopper. It was a large painting of a Standard gas station. I remember his reaction upon seeing this picture. There was a long pause, then he came out with the words, 'Oh, man!' No other verbals necessary. This was the way we communicated."

Untitled (Hippie Girl Dancing), 1967.

Early on, Hopper also wrote poetry, painted abstract canvases and made sculptures. He gave up painting in 1961 after a fire destroyed his home and most of his possessions, including his own paintings and his contemporary art collection. At that time, he was preparing for his first photography exhibition at the Photo Lab/Gallery in Los Angeles and, from then on, photography became his obsession. Initially, he made abstract work, experimenting with multiple images and enlarging his prints, often exhibiting his assemblages alongside found objects. He won first prize in a worldwide open submission competition in Australia for an early series called Pieces and was written about glowingly in Artforum in 1963 in a feature headed "Welcome brave new images!"

At Ferus, he became the in-house photographer, photographing the gallery's artists for catalogues, exhibition flyers and art magazines. "Dennis was shooting many portraits of his friends in those days, especially artists," says Ruscha. "I remember, with me, he picked the location, a storefront on Santa Monica Boulevard that sold saws and industrial tools. There was not a lot of making ready or posing to my portrait. He used his trusty Nikon 35mm camera. In 10 to 15 minutes, he had just what he wanted."

In 1965, London's hippest gallery owner, Robert Fraser, a friend of the Beatles and the Rolling Stones, who would later be arrested with Mick Jagger in the infamous Redlands drug bust, visited Hopper's studio with Irving Blum. The two hit it off and Hopper took Fraser to Ed Ruscha's studio, where he bought some pieces that he later sold to John Lennon. In 1966, Fraser included Hopper's work – abstract photographs alongside giant foam boulders and cacti – in a group show, Los Angeles Now, at his Mayfair gallery alongside Ruscha and six other California artists.

In Groovy Bob, Harriet Vyner's oral biography of Fraser, Pauline Fordham, a gallery assistant, recalls her first meeting with Hopper. "This strange paranoid guy arrived… covered in camera equipment in tan leather cases, straps, thongs etc – masses of it – which never left him. He slept, ate, went out with it – whether he went out to dinner or a nightclub. I'd say, 'I don't think you have to take all this rather wonderful camera equipment with you.' He'd reply, 'My wife, who I've just married, gave it to me, and if I lose anything, she'll kill me.' It was quite bizarre to see this smallish man covered in equipment."

Hopper's then-wife was the actress Brooke Hayward, who was instrumental in his photographic career. Not long after they met in 1961 she bought him an expensive Nikon camera for his 25th birthday. "I spent my last $351 on a Nikon that was thereafter permanently slung around his neck," she recalled later. "He never left the house without it. It turned out that he was as natural a photographer as he was an actor." Hayward's daughter with Hopper, Marin, recalls: "He always had a camera around his neck. This is how I remember him. His friends called him the Tourist. My brother once drew a family picture and gave my father a camera for a head."

Hopper continued photographing the world around him and defining his distinctive observational style until 1967, when the idea for Easy Rider started gestating in his head. By the end of 1969, on the back of the film's surprise success, he was feted as the voice of the hippy generation, but he was too complex and unpredictable for that. As his spectacularly indulgent, intermittently brilliant, follow-up, The Last Movie, showed, Hopper made work purely for himself. The film, shot on location in Peru, ran way over budget and the task of editing Hopper's reams of footage took him more than a year. By then, divorced from Hayward, he had retreated to Taos, New Mexico, where his unruly, drink- and drug-fuelled life became the stuff of legend.

"I stayed in touch with him over the years," says Ruscha, "and in 1972 stayed in his compound in Taos. He was in an edgy period of his life, having finished Easy Rider and The Last Movie, and was feeling alienated and detached from his friends in the movie industry… His character in the movie Apocalypse Now was true to his form as an actor and a person in real life. Together with his character in Blue Velvet, it forms a vital and powerful image of Dennis as an actor and a person."

Hopper's film career since Blue Velvet never quite matched the intensity of that performance, though roles in Paris Trout (1991), True Romance (1993), Speed (1994) and a turn as the evil Victor Drazen, in the American TV series 24 kept him in the public eye. Back in the early 70s, however, as Hopper's reputation for self-destruction grew – he later claimed he was drinking half a gallon of rum and snorting three or four grams of coke a day – he often seemed, as Ruscha intimates, to be playing himself: a lost soul on an arc of epic self-destruction.

In 1970, though, he was together enough to sort through his huge collection of negatives, select and produce the 429 small prints he took with him to Fort Worth for his first retrospective exhibition. What happened to them between then and their rediscovery in 2010 remains a mystery.

By the mid-1970s, the negatives were almost certainly stashed in his house in Taos which, as Giloy-Hirtz puts it, had become "a biker gang, lesbian, drug and hippy nest". There, Hopper had also developed a fondness for guns. When Taschen published Dennis Hopper: Photographs, 1961-1967, edited by gallery owner Tony Shafrazi, who also put on shows by Hopper, it included an essay called The Taos Incident. It was written by Hopper's long-time friend, the late Walter Hopps, an influential photography curator. Hopps recounted how, following a series of night-time shootings at Hopper's house, he had put "nine guns, including the goddamn machine gun… under our mattresses", before gathering up all the negatives and contact sheets that were scattered about the house and fleeing back to Los Angeles.

Those contact sheets and negatives have since provided the raw material for every exhibition and book of Hopper's photography until the discovery of the original prints for the Fort Worth show in 2010. They are, as Giloy-Hirtz attests, "a treasure trove" of information about how Hopper's creative mind worked back then, not least in the surprising scale of the prints and "how densely the photographs were mounted, often three rows high, organised in thematically arranged blocks as well as in unusual juxtapositions."

They provide further evidence, if needed, of Hopper's instinctive talent for composition and his impatient, but remarkably focused, eye. "His relationship to photography was very natural. He had an eye," says his daughter Marin. "Photography didn't fit into his life, it was a part of his life." Ed Ruscha, who was one of the pallbearers at Hopper's funeral at the San Francisco de Asis church in Ranchos de Taos, says: "He approached his photographs as a sort of wandering of the soul, followed by the familiar ka-chunk of the Nikon."



Dennis Hopper: The Lost Album by Petra Giloy-Hirtz (Prestel Hardback, £35)