Robert Colquhoun and Robert MacBryde were two working-class lads from Ayrshire who enrolled at Glasgow School of Art (GSA) on the same day in September 1933. After a couple of months travelling up and down to their respective homes in Kilmarnock and Maybole each day by steam train, "The Two Roberts", as they were quickly dubbed, found digs together in Glasgow.

They become a couple with a fiery relationship that, despite social mores and legal restrictions of the day, was neither hidden nor denied. This partnership lasted for three decades until Colquhoun's death at the age of 47 in 1962.

Robert Colquhoun was tall, dark and handsome; attractive (and, it is said, attracted) to both men and women, with a tendency to drift back and forth into cycles of depression. A natural foil, Robert MacBryde's innate gaiety drew fellow artists and writers into their circle, like moths to a flame.

Both were widely considered by their peers at GSA to be the most talented artists of their generation. Scotland was never going to be big enough for the Roberts and in 1941, both having been deemed unfit for active service, they moved to London. There they found themselves at the centre of a Bohemia of their own making, counting among Soho drinking cronies artists such as Francis Bacon, Lucien Freud, Keith Vaughan and John Craxton, as well as poets Dylan Thomas and George Barker.

Throughout the early 1940s, they found inspiration for their art in the devastation of war-torn London and, in contrast, the countryside beyond, influenced by the Neo-Romanticism style of lyrical landscape painting as typified by Graham Sutherland and John Piper.

In 1943, the Roberts met Polish artist, Jankel Adler, a friend of Picasso and Paul Klee, who encouraged them to paint from memory and to examine their Scottish and Celtic roots. Adler also had an interest in texture and his post-Cubist predilection for dividing objects into patterned forms inside a black grid - almost like stained glass - was much emulated by MacBryde. Adler's favourite subjects - cats birdcages and beggars on crutches - also found their way into both Roberts' work.

By 1946, Colquhoun was being described in influential BBC periodical The Listener as the "most promising painter England [sic] has produced for a long time", while Vogue declared them "Tomorrow's Names" in the same breath as theatre director Peter Brook, artist John Minton and Joy Of Sex author Alex Comfort. The British Council, the Contemporary Art Society and the Museum of Modern Art in New York all acquired their work.

Although it makes for a good story, the Golden Boys legend, which saw the Roberts go from bright young things to dissolute alcoholics in the space of two decades, has done them a disservice by turning two painters who were deadly serious about their work into a caricature. This exhibition places it all in context, while revealing the sheer magnetism, energy and originality which lies beneath their work.

Beautifully curated by Patrick Elliott, it features 60 paintings, 70 drawings and monotypes, and an array of photographs and personal papers. The perceived wisdom is that Colquhoun was the better painter, but looking at the work displayed here, it's clear both men were on a level playing field.

It's interesting to see unresolved works here, such as Colquhoun's The Lock Gate (1942) and MacBryde's Farmhouse (1941), which both toy with Neo-Romanticism. In figurative paintings such as Encounter (1942) and Thea Neu (1943), the influence of Wyndham Lewis is clear on Colquhoun.

Stand-out work includes paintings and monotypes (a painterly printing technique Colquhoun learned from Adler) dating from 1944 through to around 1951. During this period, the Roberts shake off war-time drabness in their approach to colour and start to experiment with texture.

In Colquhoun's case, his figurative work takes on a darkness, which bubbles up from within a painting. Works such as The Performer (1947) are fused throughout with a warm zingy palette. Colquhoun's figures are usually pictured in pairs from the waist up, with meaty hands floating mid-air and heads tilted to the side; all angles and angst, much of it autobiographical.

Perhaps in a nod to his bisexuality, in his painting The Lovers (1947), the MacBryde "figure" has morphed into a woman.

MacBryde's preoccupation was always domestic. Still lifes, like Still Life With Cucumber (1948), are lush and acidic with a soupçon of priapic tension in phallic fruit and vegetables nestling side-by-side. Performing Clown (1946) shows that MacBryde is comfortable with figures too, although there's sadness in the autobiographical nature of this work.

Colquhoun was a near-genius at creating monotypes. Two Irish Women (1946) is on show in a small section devoted to works he made following a trip to rural Ireland with MacBryde. In this stunning version of a not-so-hot 1958 painting, Women In Ireland, (not on show here), two totem-like women are wreathed in blue-black shawls. The sootiness surrounding the figures reveals Colquhoun on fire with the innate possibilities of the figure and teasing out texture.

In 1951, with their fame receding as buyers' and gallery owners' attention turned to the US and abstract expressionism, the Roberts moved to the Essex countryside, where in exchange for looking after the four children of George Barker and his partner, writer Elizabeth Smart, they received free bed and board.

They enjoyed success at the end of 1951 with a commission to create collaborative designs for a new ballet at the Royal Opera House, but gradually their lives spiralled into a haze of alcohol-induced penury and homelessness.

Walking into the last room on the ground floor of Modern Two, filled with late work, we hear an almost musical Scots voice talking about how he loves the "citrrrrussssy" nature of a lemon. Suddenly, 48 years after he was killed by hit-and-run driver on a Dublin street while he danced a jig, MacBryde is before our very eyes.

He is followed by the darker presence of Colquhoun, telling us that artists convince themselves "everything is going fine but at the back of your mind, something is fundamentally wrong". This 10-minute-long black and white film made by Ken Russell for the BBC Monitor series in 1959 is a gift.

But it's when you round the corner, to be met with the series of monotypes in white, black and red, which Colquhoun was working on when he died in MacBryde's arms three years later, that you begin to get a cumulative sense of what the Roberts were really about. And not before time.

The Two Roberts: Robert Colquhoun And Robert MacBryde, Scottish National Gallery of Modern Art (Modern Two), Edinburgh (0131 624 6200, www.nationalgalleries.org) until May 24