Dick Cavett didn't know what had hit him. The mild-mannered, impeccably liberal TV host had had some far-out guests on his ABC talk show, but no one like Sylvester Stewart had ever plonked himself down in the guest armchair before. Certainly no one in Stewart's physical state, for which the term 'wrecked' would have been a polite euphemism.

Slurring his deep nasal words and rolling his tired eyes as he shuffled in the chair, the man known more familiarly to Americans as Sly Stone had Cavett somewhere between mystified and terrified. Supercool and pimpadelic in a black hat that resembled a tea-cosy-cum-turban, Stone had finished up a thrilling version of the brilliant 'Thank You (Falettinme Be Mice Elf Agin)' before sauntering over to chat with Cavett. He looked like some exotic street-corner warlord.

'I look in the mirror when I write,' Sly drawled when Cavett asked about his songwriting methods. 'The reason why I do that is because I can somehow be a great critique [sic] for myself, and I can react spontaneously before I realise that I'm going along with what I'm doing, and dislike it or like it before I realise that I'm doing it...'

The bemused Cavett didn't know how close Stone had come to not making the show at all. The previous evening, after visiting Muhammad Ali in New Jersey, the singer suddenly announced he was flying back to his house in Los Angeles. Only the remonstrations of his friend Bobby Womack and his right-hand-man Hamp 'Bubba' Banks stopped him in his tracks. 'He just found every excuse to not go on that show,' Womack told Joel Selvin, author of the chilling Sly and the Family Stone: An Oral History (1998). 'He was petrified, now that I look back on it.'

Come show time at the ABC's Manhattan studios the next day, Stone was nowhere to be seen. He was still in his hotel, working his way through a stash of cocaine and deferring departure as long as he could. Every time Banks or Womack got him downstairs to the lobby, Sly headed back to his room for another fat line. Eventually it became so late that Banks had to charter a two-passenger helicopter to pick Stone up and fly him into Manhattan. Breathing a sigh of relief, Bubba watched the chopper take off with Stone and Womack aboard.

Even then the crisis wasn't over. Driving back to the airport terminal, Banks noticed the helicopter circling back to land where it had taken off. He raced to the helipad to see what the problem was. Turned out Sly needed to swap seats with Womack. A draft on Sly's side of the chopper was blowing his cocaine away.

To anyone on the inside of the Family Stone circle, the incident was merely par for the hazardous course Sly was on in mid-1971. No-shows and last-minute helicopter rides were frequent features of life in and around the band that had done so much to bridge the worlds of black soul and white freakdom. The previous year, Stone had failed to show up for 26 of the 80 live dates booked for the band so far in 1971 he'd blown out 12 of the group's 40 shows. Those he did make he was invariably late for. Far from feeling remorse for this, he revelled in the power it gave him. More hair-raising still was the twilit world within 783 Bel Air Road, the mansion Stone was then renting in LA's exclusive Coldwater Canyon from John and Michelle Phillips, the sometime Papa and Mama who themselves had turned the former home of actress Jeanette MacDonald into a den of debauchery. Here it was that Sly was working on a new album, one with the working title The Incredible and Unpredictable Sly & the Family Stone

The most unpredictable thing about the fifth Family Stone LP was whether it would ever be finished. So long was it taking - with only 1970's Greatest Hits to placate fans - that Stone's neurotic gay manager David Kapralik had devised a marketing slogan for Epic Records that read 'Two Years is a Short Time to Wait for a Work of Genius'.

'Sly was simply not producing albums at all,' wrote Clive Davis, who had signed the group to Epic in 1967. 'I heard stories that he was laying down hundreds of instrumental tracks in Southern California studios - without vocals. There was strong speculation that he would never sing again.'

For those involved with the album, the sessions at 783 Bel Air Road and at LA's Record Plant studio were very different from anything Sly and the Family Stone had done before. Where the group's ground-breaking anthems - exuberant bursts of polyrhythmic rock'n'soul such as 'Dance to the Music', 'Everyday People' and 'I Want to Take You Higher' - had been recorded with the emphasis on live feel and big-room ambience, now Sly was overdubbing instruments one at a time and plugging them directly into the board for a parched, almost claustrophobic sound.

Family Stone members weren't even on some tracks. Instead, a rotating cast of cronies - Womack, Billy Preston and others - pitched in with cameos during sessions that rarely began before midnight but often flowed over the course of several days. Sleep only punctuated these recording marathons when the musicians' constitutions could stand no more cocaine. When Sly himself fell asleep it was literally impossible to wake him.

'It was so spacey,' Bobby Womack told me. 'I remember sitting there in the dark in Sly's studio, coked to the brain, trying to sing, staying up four, five, six days. That's just the way he was.'

Stone's new music was murky, restless, unpretty, a superfly nod to the spacey wah-wah meta-funk of Miles Davis's Bitches' Brew . It was bad, even evil, a radical break with the rainbow-coalition soul of 'Everyday People'.

'Sly said to me, "Man, I'm comin' outta left field o' these motherfuckers",' Womack remembered. 'He said: 'My music is like the devil's music it's got a little of yours in there but you can't recognise it 'cause it's so loose and raw."' Miles himself is known to have dropped in on the Incredible Unpredictable sessions. Other musical peers hanging out at Bel Air Road included Ike Turner and Johnny 'Guitar' Watson, both West Coast R'n'B veterans with a taste for the white stuff. A more unlikely presence was that of white southerner Jim Ford, whose gritty country-soul album Harlan County had been released in 1969. 'Sly wasn't the easiest guy to hang around but he loved Jim Ford,' says Bobby Womack. 'I think for Jimmy to be that close to Sly, he had to be doing something that was very important to the situation.'

Anyone who has done cocaine will be familiar with the temporary illusion of omnipotence it affords you. Sly's need to control the members of his entourage knew no bounds nor did the paranoia that escalated as he kept tooting. Coke wasn't even the worst of it: things got really out of hand at Bel Air Road when the dreaded hypnotic sedative PCP, aka 'angel dust', was added to the chemical mix. Factor in a pack of psychotic dogs and a virtual arsenal of guns and there was a pretty scary scene going down in the house.

'[Sly's] goons were sullen, unfriendly and armed,' John Phillips wrote in his autobiography Papa John . 'These people were rough. They laughed at me. There were lots of guns, rifles, machine guns, big dogs.' 'It all fell apart at Coldwater,' Hamp Banks told Joel Selvin. 'That is when Sly did the PCP and he was just out of it... all the way out. There wasn't anything happening no more. He was doing shit you would expect to see in some kind of institution for mentally retarded people.'

'Sly would be dressed all in red leather, handing out the orders,' Womack told me. 'Like, "Tiffany, baby, I want you to take Bobby to your room, y'know, fix him up." As time progressed, I became paranoid at everything, I was always thinking I was going to get killed, that the feds was gonna bust in on Sly. Later you give Sly one hit and he's looking around the room, very paranoid, you couldn't make no music with him. I got to the point where I said, I gotta get away from here.'

Like Womack, Stone's loyal secretary Stephani Owens also made it out of Bel Air Road in the nick of time. She called the band's acting manager Ken Roberts, begging him to send a cab and $200, and fled for her life. 'I had dissipated down to nothing, from no sleep, alcohol, and doing drugs,' she said. 'When I came home at the airport, my mother looked at me and started crying.'

Those words are from 'Family Affair', the biggest hit and most famous song from There's a Riot Goin' On - the title the album bore when it finally appeared in the fall of 1971 - after which Sly began a long disappearing act, only to resurface against all the odds at this year's Grammy awards in Los Angeles (see box on previous page).

The album's least typical track, 'Family Affair' was sexy, touching, minimalist, cantering on a groove Sly had programmed on a primitive drum machine. Released as a single against Sly's wishes, it shot to the top of the US charts in November 1971 and stayed there for three weeks. 'One child grows up to be/Somebody that just loves to learn,' Sly droned in a hollowed-out baritone. 'Another child grows up to be/ Somebody you'd just love to burn...'

For some insiders, this mini-meditation on nature versus nurture was ironic, to say the least. David Kapralik, as crippled by cocaine as his star client, told Rolling Stone magazine the song was about the fissures within the Family Stone itself.

'The family, to me, was one of the most hypocritical things that I had ever seen,' said JB Brown, one of Stone's lackeys. 'I thought it was a sad situation because you respected them, thinking they are church and their religious thing was valid. But you watched them allow all this crap to take place... just the weirdest stuff you ever want to see.'

Just how did the Family Stone get so dysfunctional? How did this Bay Area troupe, so innovative in its racial/sexual shake-up, become such exemplars of Hollywood Babylon sleaze?

The group had started out as a mid-Sixties bar band in the suburban towns of the San Francisco peninsula, pounding out soul and R'n'B covers in after-hours joints like the Winchester Cathedral in Redwood City. Sly alternated between his role as band leader and his day job as a fast-talking, wise-cracking radio DJ on KDIA in Oakland. Years before that, Sylvester Stewart and siblings Freddie and Rose had been part of a family gospel group, the Stewart Four, the crucible for their overlapping vocal arrangements.

Sly also had a foot in another important Bay Area camp: the acid-rock scene fomenting around San Francisco's Haight-Ashbury district. A meeting in 1964 with DJ and impresario Tom 'Big Daddy' Donahue led to Sly becoming in-house producer for Donahue's Autumn label, for which he crafted pop hits by the Beau Brummels and Bobby Freeman. Sly was at the controls for early recordings for Haight-Ashbury legends the Charlatans and the Great Society, though his domineering approach rubbed both bands up the wrong way - especially when he put Grace Slick through 50 takes of the Society's 'Somebody to Love'.

Sly's exposure to the freaky goings-on in the Haight and his readiness to mix up rock and soul on his radio shows made it inevitable that his Family Stone would be no ordinary group. 'We had all this input no one had ever thrown together before,' recalled white drummer Greg Errico. 'You had R'n'B, you had white pop, you had the psychedelic thing and the English thing, mixing together for the first time.'

When the band's debut album stiffed badly, David Kapralik - then an Epic Records A&R man overseeing their career - advised Sly to simplify the songs on the next record. Sly took his advice and came back with 1968's 'Dance to the Music', pulverising the polarities of black and white, male and female, rock and funk. Built on the stomping grooves of Errico and bassist Larry Graham and lifting the listener ever higher with its mix of horns (Jerry Martini and trumpeter Cynthia Robinson), churchy keyboards (Sly and Rose Stone), fuzzy rock guitar (Sly and Freddie Stone) and unisex vocals, this was superbad psychedelia - James Brown at the Human Be-In.

The following year 'Everyday People' sat at No. 1 for four straight weeks in the spring the lovely and lilting 'Hot Fun in the Summertime' hit No 2 in August. If Otis Redding had introduced soul to the love generation at the Monterey Pop festival two years earlier, Sly sanctified the hippies with a magnificent, middle-of-the-night set at Woodstock.

In late 1969, however, a new and darker note crept into Sly's music. Against the backdrop of the Manson murders and the militant Black Panthers - formed in Oakland - the Family Stone dispensed with the flower-power euphoria. The Stand! album featured the mordant 'Don't Call Me Nigger, Whitey (Don't Call Me Whitey, Nigger)' and the joyless jam that was 'Sex Machine'.

Then in January 1970 came the real sucker-punch: the stunning 'Thank You (Falettinme Be Mice Elf Again)', with its evocation of Sly's teenage years in the gangs of his hometown Vallejo and its startling Larry Graham bass line, birth of the thumb-plucked 'popping' bass style that underpinned funk through the Seventies and Eighties.

If the song's third verse expressed gratitude for survival, for the healing of wounds - 'Mama's so happy/ Mama starts to cry/ Papa's still singin'/ You can make it if you try' - what stayed with the listener was the wired terror of its opening line: ' Looking at the devil , grinning at his gun...' That, as Papa Stewart himself could have attested after one of his periodic visits to the house, was closer to the reality of everyday life at 783 Bel Air Road.

Just as Motown was giving the Jackson 5 a Family Stone makeover with the exhilarating 'I Want You Back', Sly himself was retreating into a cocoon of cocaine and brooding introspection. 'Feel so good inside myself,' he sang on the opening 'Luv'n'Haight'. 'Don't need to move.' The music on Riot was the antithesis of the joy and openness of 'Everyday People' or 'You Can Make it If You Try', implicitly spurning Sly's role as King of the Black Hippies. The group had certainly caused riots - of both the positive and negative kind - but this album was a solipsistic riot of the mind, not some Bacchic uprising.

'The songs seem to wander,' Greil Marcus wrote of Riot in his book Mystery Train 'to show up and disappear, ghostly, with no highs or lows.' Ghostly is right: there's precious little warmth on this album. Even tracks as implicitly tender as 'Just Like a Baby' and '(You Caught Me) Smilin" sound diffuse, drifting. 'Poet' and 'Spaced Cowboy' (the latter complete with sardonic yodelling) flaunt Sly's self-absorption. 'Out and down/ Ain't got a friend,' he sang on 'Brave and Strong'. 'You don't know who turned you in.' 'Time' is formless, inchoate, the work of a man who forbade the presence of clocks at 783 Bel Air Road.

'We used to call it the prison because we couldn't get off the hill,' Family Stone production manager Robert Joyce said of the mansion. 'Sly's thing was no time. He made time, that was his thing. Now... we are doing it right now. That was the mentality.'

Concluding the album was 'Thank You for Talkin' to Me Africa', a reworking of 'Thank You' that drained the song of all its groove and spirit and simply ground remorselessly on for seven dead minutes. It sounded like the ultimate disavowal of funk as party music.

Riot as a whole is one of the definitive death-of-the-Sixties artefacts, an aural downer in the aftermath of the decade that was supposed to change the world. OMM contributor Charlie Gillett, reviewing it in January 1972, described the album as 'the diary of a man going through a lot of pain in an attempt to identify and define himself'. Other critics were more flummoxed, less charitable. Creem 's John Morthland bemoaned 'the same plodding, lethargic beat that continues seemingly unabated for 45 minutes', while Let it Rock 's Pete Wingfield decried the album's 'sniffing self-pity'.

On the back of 'Family Affair', There's a Riot Goin' On made the top of the US album chart for two weeks in November 1971, thus funding Sly's drug bill for another year. A new contract bought out David Kapralik, whom Sly had reduced to a snivelling, coked-out wreck. 'David got very rich,' the late Al Aronowitz wrote, 'but playing Jewish mother to a black pimp left him thinking about what every Jewish mother thinks about when her only son doesn't call her any more. Suicide.' On at least one occasion Kapralik attempted just that.

Sly took to cruising the freeways and boulevards of LA in a 36-foot Winnebago, a sealed chamber even more hermetic than the studio at 783 Bel Air Road. 'We used to ride around, getting high and making music,' Bobby Womack remembered. 'We would ride all up in the hills and he wouldn't never stand still. He'd say, "Keep drivin'"! I was already spaced out because I was losing my wife. He said: "I ain't never gonna give no woman that much action." He said: "You're too nice. I'm nasty, I don't give a fuck."'

He gave more of a fuck when the Winnebago was stopped and searched by police on Santa Monica Boulevard in July 1972. By then, though, the original Family Stone was no more. Larry Graham and Greg Errico were gone, to be replaced on 1973's Fresh by bassist Rusty Allen and drummer Andy Newmark. On the album's opener - the nervy, supertight 'In Time' - Sly sang, 'There's a mickey in the tasting of disaster/ In time you get faster...' Disaster Sly had certainly tasted remorse for his behaviour he was apparently incapable of feeling. The enduring cult status of Riot says much about our ongoing fascination with the dark side of black music. Long before crack devastated America's inner cities, cocaine turned more than a few pioneers of soul and funk into psychotic monsters. At least two of Sly Stone's most devoted disciples - George Clinton and Rick James - had their own battles with the demon flake.

But Sly was just as much an influence on the teetotal Prince, whose Revolution was a transparent nod to the multi-race/gender collective that was the Family Stone. Sly and Riot haunt R&B and hip hop to this day, their menacing moods and grooves heard in the work of artists from D'Angelo to OutKast. 'D'Angelo played Riot constantly in the studio while recording his masterpiece Voodoo ,' says American writer Miles Marshall Lewis, whose study of There's a Riot Goin' On is published this spring in Continuum books' excellent 331/3 series. 'R&B and hip hop both owe a tremendous debt to the honesty of R iot 's lyrics in describing the darker side of the black experience.'

Sly never touched the genius of 'Thank You' or 'Family Affair' again. A grave decline was already clear by the release of Small Talk (1974), though that was nothing next to abject albums like Heard Ya Missed Me, Well I'm Back (1976) and Back on the Right Track (1979).

Throughout the Eighties Sly continued to struggle with drugs. In 1983, he was found semi-conscious in a Florida hotel room after a cocaine overdose. In November 1987, he told the Los Angeles Times that he was clean, only to be charged days later with cocaine possession. Declared a fugitive in 1989, he was arrested in Connecticut and extradited to Los Angeles, where he pleaded guilty to driving under the influence of cocaine and then guilty again to two counts of cocaine possession.

Inducted into the Rock and Roll Hall of Fame in 1993, Sly kept both band and audience waiting as the Family Stone ran through a version of 'Thank You'. 'As usual, it's just us,' Rose Stone sighed onstage. Finally materialising in an electric-blue leather jumpsuit, Stone gave the most perfunctory of speeches, muttered 'See ya soon', and disappeared into the night.

Since then Stone sightings have been few and far between. No one is entirely sure where he even resides, other than that it's somewhere in California. George Clinton believes his old friend is in Malibu. Wherever it is, it's unlikely Sly is in fine fettle. His manager Jerry Goldstein, who did not return phone calls for this article, has admitted the singer is 'frail'. When Stone attended his father's funeral four years ago, his back appeared to be hunched, the result possibly of the desperately poor nutrition that attends chronic cocaine use. His appearance at the Grammys left as many questions as it provided answers.

'He's been in seclusion for so long, he's like JD Salinger,' Greg Zola, director of a new documentary about Stone, told the Washington Post . 'He was so famous for a period of time, but he's just not around any more. A lot of people who you'd think are in the know actually think Sly Stone is dead.'

Those who were involved with There's a Riot Goin' On - and who got burned by it - look back and tremble, all too aware that the album's creation was nothing less than a dance with the devil.

'There were many nights that I didn't want to go home,' Bobby Womack reflected. 'I was just there and we just kept cutting. Sly would say, "Bobby, you gotta sing on this, you gotta do this". Well, to be into that you had to live it.'