IN an upstairs exhibition space in the Scottish National Gallery of Modern Art, senior curator Patrick Elliott watches on as a member of his conservation team examines a large painting laid flat on a table.

It's called Man With A Melon and it was painted in 1952 by Maybole-born artist Robert MacBryde.

As we talk, Elliott points out a flaw on the canvas. It was already there when the painting arrived from its lender, though given its provenance one slight imperfection is pretty good going - it's one of a cache that hung for many years in a Leicestershire school and which Elliott turned up as he was putting together the exhibition of which it forms a part: The Two Roberts, the first show in decades for MacBryde and his collaborator and lover, Kilmarnock-born Robert Colquhoun. Amazingly it's also their first major retrospective.

Although the artist and playwright John Byrne turned their story into a drama for London's Royal Court Theatre in 1992, the show's intention is to re-introduce Scottish gallery-goers to a pair of artists whose work has been sorely neglected for generations.

To that end it's also been a journey of discovery for Elliott, one which has taken him round municipal collections across England and Scotland and seen him visit those few, dogged private collectors who have kept faith with the work. Often, there was a surprise for him (and them) at the end of the road.

"I went to see one painting in a storage unit in Cambridgeshire and they didn't even know what it was," he says. "They'd valued it at £600." It turned out to be by MacBryde and even a conservative estimate would see a couple of zeroes added to the asking price if it came up for auction today.

There was another in Bournemouth in which MacBryde's name had been spelled wrongly on an inventory list - not so inept when you consider he changed the spelling twice himself - and Elliott had good news for the private collector he visited who had bought a MacBryde in 1972. Or thought she had. "I went along to see it and told her it was a Colquhoun," he says. "It had been wrongly attributed. They're worth quite a lot more, so she was pleased."

The Leicestershire collection, meanwhile, had been bought under the auspices of an Art For Schools programme in the 1960s, back in the days when there was funding for such high-minded benevolence. Under the programe, paintings were bought and exhibited in schools, though as education budgets were tightened over the intervening decades, the more valuable ones were sold. Still, it's wonderful to imagine generations of schoolchildren staring at MacBryde's Picasso-inspired study of a man and a melon and dreaming of - well lunch, probably, but hopefully something more uplifting.

In a sense the mix-ups are understandable and inevitable. The two Roberts met as first-year students at Glasgow College of Art in 1933 - on the first day of term according to some reports - and were virtually inseparable until the day in September 1962 when a booze-addled Colquhoun died in MacBryde's arms, aged just 47. MacBryde followed him to his grave four years later, hit by a vehicle outside a Dublin pub as he danced a drunken jig in the road.

By the time of their deaths they had travelled from obscurity to art world fame, and back again. It's a story which takes in hard work, hard drinking, art, drama and equal parts talent and luck, both good and bad. No surprise, then, that John Byrne found it so appealing.

It was luck of the first sort that took Colquhoun and MacBryde from Scotland to London. A chance encounter in Edinburgh's Waverley Station between MacBryde and young artist John Tonge - they were both carrying portfolios, got talking and went for a drink - brought MacBryde and Colquhoun into the orbit of wealthy London arts patron Peter Watson. He invited them to stay with him at his plush, art-lined Kensington flat (MacBryde likened it to "living inside an orchid") and by 1943, after a plan to move in with their new friend Dylan Thomas had come to nothing, the pair settled in a studio flat in Bedford Gardens in Notting Hill. "They couldn't have fallen on their feet better if they'd written a script," says Elliott.

Here the talent kicks in. The pair began to show their energetic, Picasso- and Braque-inspired portraits and still lifes at the prestigious Lefevre Gallery and were soon being photographed by John Deakin for Vogue as part of a 1946 feature on up-and-coming artists. Two years later they were showing alongside their friends and Soho drinking partners Francis Bacon and Lucian Freud in New York's Museum of Modern Art, part of a small survey of the best young British painters of the time. The room in Modern Two we're standing in is devoted to this period, what Elliott calls "the Golden Years", also the title of a concurrent exhibition of their work at Edinburgh's Scottish Gallery.

In person the pair were handsome, dashing and often riotously behaved. They were most memorably captured on film by Deakin, both for Vogue and in his own work documenting the Soho demi-monde of artists and painters of which they were briefly such an important part. In one telling image, he captures MacBryde asleep on Colquhoun's shoulder. Drunk, possibly, or just shattered after hours of working obsessively.

Interestingly, the pair also painted many self-portraits, often featuring both of them. In these - and in one in particular, which displays MacBryde as a woman - Elliott sees a foreshadowing of the work of artists such as Cindy Sherman. Their personal and collaborative relationship, meanwhile, pre-figures that of Gilbert and George. "As a duo, that's as close as it comes," says Elliott.

And like Gilbert and George, they did work collaboratively, most notably on a series of theatre and ballet designs. Together they created the costumes and set for a 1951 Sadlers Wells Ballet production of a new Scottish-themed work by choreographer Leonide Massine called Donald Of The Burthens. Two years later, Michael Redgrave stepped out on to the stage of the Shakespeare Memorial Theatre in Stratford-upon-Avon to play King Lear in costumes designed by Colquhoun with help from MacBryde. Colquhoun also designed the brooding set, with its Henry Moore-esque stone centrepiece. Designs for these costumes and photographs of the set are among the 70 works on paper included in the Two Roberts show.

Their sexuality is also part of the story. "It's fairly evident in the work," says Elliott, pointing to a particularly phallic-looking object in one still life. "But people didn't know about it. I think it was a taboo subject so even if they did suspect, they wouldn't have wanted to go into it because it was an awkward thing. Obviously it was illegal as well. But a lot of their circle were gay anyway - Francis Bacon, Keith Vaughan and a lot of the poets."

But less than a decade after that New York show, the pair had been evicted from their Bedford Street studio and MacBryde was writing to friends begging for small sums of money as debts mounted, commissions dried up and alcohol began to take its toll on their work and their health. They became peripatetic and were taken in for a while by Elizabeth Smart, wife of poet George Barker and author of By Grand Central Station I Sat Down And Wept.

She invited them to live with her and her four children in a run-down Essex farmhouse where Colquhoun painted one of his best-known works, Figures In A Farmyard. In a 2006 memoir by Christopher Barker he was remembered as having a "sweet and charming nature" that "was also volatile and could suddenly change, often under the influence of alcohol and he'd unleash a thunderous temper". Testament to his lingering glamour and good looks, Barker also likened him to film star Gary Cooper.

"It's often said that it was abstract art that killed them off and that their fall from fashion was owing to that," says Elliott. "It's nonsense. Bacon and Freud never got abstract. There was room in the British art world for the lot of them."

So while on the face of it The Two Roberts is a centenary show - Colquhoun was born in December 1914, MacBryde a year earlier - the exhibition also serves as a re-assesment of the careers of a pair of Scottish artists whose life stories are extraordinary, whose end was tragic and whose work deserves to be better known.

"They are giants who have been ignored," Elliott insists. "But the prime thing is they're cracking artists. You don't have to make excuses. The weird thing is not that we're doing this exhibition but that nobody's done it before. I've been around Britain for the last year digging out pictures in public and private collections, and just one of the pictures was actually hanging on a wall. All the others were in store. So I think the names are familiar but the work isn't."

And that, he adds, is "one of the curiosities about them: their art died with them". Until now, that is.

The Two Roberts: Robert Colquhoun & Robert MacBryde opens at the Scottish National Gallery of Modern Art's Modern Two on November 22 (until May 24). The Golden Years: Robert Colquhoun And Robert MacBryde is at The Scottish Gallery, Dundas Street Edinburgh (until November 26)