In 1979 George Harrison purchased, almost on a whim, what Terry Jones would later call "the most expensive movie ticket of all time". After a single reading of the script of Monty Python's Life of Brian, he mortgaged his own luxury mansion and sank the resultant funds into a project that had been abandoned, days before shooting started, by its original backer, Bernie Delfont of EMI. Why did he do it? "Because I liked the script and I wanted to see the movie," said Harrison later. A Beatle can do that.

From that almost informal exchange of favours between good friends sprang arguably the most interesting British production company of the 1980s, Handmade Films, backed by Harrison and his producing partner Denis O'Brien. Handmade gave us Brian and Withnail & I, The Long Good Friday and Mona Lisa, and the early work of Terry Gilliam. That legend is well known; less well known is that Brian was not Harrison's first foray into film production; that distinction belongs to Stuart Cooper's superb adaptation of David Halliwell's play Little Malcolm and His Struggle Against the Eunuchs, retitled Little Malcolm. It was made in 1973, won the Silver Bear at Berlin in 1974, and then was lost to public view for nearly four decades as one of the many contested assets of what Cooper today calls "the Beatles' divorce".

"George never said this to me," says Cooper, "but I definitely got the feeling that Little Malcolm may have been the first and last time George ever went to a play. But he was a big, big fan of it and also a big fan of [its star] Johnny Hurt, so he was in our corner already. Also, at the time, the other Beatles all had a film gig, John had done Imagine, Paul, I guess, directed Magical Mystery Tour, and Ringo was in Candy and The Magic Christian. So the only one without a film gig was George. He financed Malcolm through a company called Suba Films, which existed solely to receive profits from the animated Yellow Submarine. It was financed entirely by Yellow Submarine! It wasn't a big budget, somewhere around a million, million and a half pounds – not expensive. He financed it top to bottom. He stepped up, wrote the cheque, and we made the movie."

Cooper, then 31, hailed from wealthy Newport Beach, California, and had won a scholarship to Rada, one of six Americans chosen. Although Cooper always planned to become a director, among his classmates was Anthony Hopkins, and just graduating were Hurt and David Warner, soon to become friends, both of whom would later appear in Little Malcolm. Mike Leigh, who in 1965 would direct the first stage version of Little Malcolm (running five hours and starring the apparently cuts-averse Halliwell), was a little younger. The Leigh production flopped, but a two-hour version ran in the West End later that year starring Hurt. Harrison saw this one and loved it.

It's easy to see why. Malcolm is an impotent, powerless nobody sustained by hopeless compensation-fantasies, a recently expelled art student who sees himself as at war with what he calls "the Eunarchy" of social conformists and the sexually timid. All his art is self-portraiture while his pseudo-radical groupuscule, the toothsomely named Party of Dynamic Erection, is camouflage for the knock-kneed terror that its members – Wick, Irwin and Nipple (Warner) – all feel in the presence of women. Hurt's magnificently verbose, quasi-fascist ranting and his fondness for loyalty tests, public shaming and show trials ("Do you plead guilty or very guilty?") soar aloft on language that's part-Beckett, part "free love" advocate Wilhelm Reich, with more than a hint of the Beatles' beloved Goons. In some moments there are clear pre-echoes of David Thewlis in Naked and the mad squabbling of Withnail & I. This is a 40-year-old movie that hasn't dated an hour.

After filming in Oldham in gas board buildings emptied out by a strike, using Kubrick's great cinematographer John Alcott, Cooper says it seemed only moments after the final cut was printed that the movie was impounded. "In the end, we got hung up by the Beatles' breakup, when all of the Apple and Beatles assets went into the official receiver's hands. So Little Malcolm just basically sat there for a couple of years. Whatever heat and buzz we generated was all lost. It didn't diminish the movie but it stopped the momentum. George had to fight to get it back.

"Berlin was the first airing we managed, but it won best direction and the response was incredible. We got great reviews from Alexander Walker and Margaret Hinxman, but by then it really didn't have any legs. It was a film that got lost, and I had to put it on a shelf and say to myself, well, there might be a day for that one day – and here we are now, after so many years."

Little Malcolm won the Silver Bear at Berlin in 1974 (Cooper's next movie, the sombre and chastening Overlord, won another Silver Bear in 1975), and the post-ceremonial bacchanals were memorable indeed. "We partied with Fassbinder the night we won the Silver Bear in '74," laughs Cooper. "He loved Malcolm, and watching him - I think everyone has a pretty clear idea of how Fassbinder looked at that point; scruffy, sunglasses, leather, unkempt beard - watching him drinking with Johnny Hurt with his horrible scruffy beard, and still dressed like Malcolm, really - they could have been twins! Fassbinder could have played Malcolm!"

•Little Malcolm is out now on Blu-Ray. Martin Scorsese's documentary George Harrison: Living In The Material World is on BBC2 on 12 and 13 November.