Daniel Kellison is a big-time producer now, running Jackhole with Jimmy Kimmel and Adam Carolla. But in the 1990s, he landed his first job on the David Letterman show, doing a little of everything — researching, producing, booking guests.

In an amazing new Grantland piece, he spills the behind the scenes secrets from some of the biggest names he worked with. But the best story by far is of that night in 1994 when Madonna went crazy on the show, dropping 14 F-bombs — then believed to be some sort of a record for network TV, or at least late night — taking off her underpants and asking Letterman to smell them, and so much more.

In a subsequent appearance in 2009, Madonna admitted to Letterman that she’d smoked a joint before coming on. But Kallison tells an even wilder story. He says it was endo, which is essentially oxycontin, that she was smoking. That explains it!

As Kellison tells the story, there was a plan for the appearance. Letterman had been making fun of Madonna every night. She would play back several of the jokes to Dave, and after he’s confronted with the videotape, ask him to explain what he meant. Everyone thought it would be great.

Check out this incredible story…

In 1994, if Julia Roberts was the biggest female movie star in the world, Madonna was arguably the biggest female star. At the same time, due to her pioneering promiscuity and her seemingly insatiable interest in surly actors, athletes, and rappers, she was also endless fodder for the tabloids — and late-night hosts. Dave loved her; she was the gift that kept giving. (As he was fond to repeat back then, “I have a theory about Madonna. I think she likes to shock us.”)

So we were very surprised when she agreed to come on the show. I spoke with her longtime rep, Liz Rosenberg, and she said Madonna was interested in coming on and basically giving it back to Dave — a little reciprocal ball-breaking, as it were.

This was, hypothetically, a problematic plan. Not that he couldn’t handle her, but Dave was a professional comedian. Madonna was a professional singer. This could go south quickly if un-reined. (Maybe you saw Madonna’s painful recent attempt at stand-up on Jimmy Fallon?)

After discussing it with Dave, I proposed a plan I thought was pretty bulletproof, that would make her look good, be “funny,” and satisfy her larger goal of making Dave squirm. I got on the phone with Madonna, who was surprisingly and truly lovely, and pitched my idea: How about you go on and complain that he’s been taking shots? He will say it’s exaggerated, he loves you, etc. — and then you say, “Oh yeah? I actually brought some tape from the show.” And then you show, in succession, three of the most horrible jokes he has told — and ask him to explain each one. That ensured his awkwardness — and the laugh. She signed off on the plan without hesitation. I then went and told Letterman I’d had a great talk with her and that she was super-engaged and receptive to the idea — and unless something went terribly wrong, I thought we were in good shape.

The day of the show, she arrived to much fanfare and press anticipation, but with no entourage. Her only accompaniment was her makeup person, Kevyn Aucoin. I walked up to her dressing room, knocked on the door, put out my hand, and said, “Hi, I’m Daniel.” She didn’t get up or offer her hand. Instead she said, “Suckmadick.” I took a beat. “Sorry?” She looked at Kevyn, smiled, and said it again, slower, like a petulant 8-year-old child challenging a parent: “Suck–ma–dick.” She and Kevyn began laughing hysterically. Immediately, I thought: We’re screwed. I smiled wanly and powered on: “Ha … OK, so this will pretty much go as we discussed. We’ve loaded up three pieces of video, each one worse than the other, and after each one …” She stopped me. “That’s too much to remember.”

Hmmm. I paused, now more annoyed than anything. “Uh, not really. It’s actually pretty simple — you show a tape. Get his reaction. Show another. Get his reaction. There are three …” “Yeah, I’m not going to remember all that.” Me, trying not to let my voice break and betray my now very urgent concerns: “Why not?” She started giggling again. “We smoked a little endo before we came here …” Fuccccckkkkkkk!!!!

I went down to Dave’s dressing room, which I tried not to do before the show. “We’re in trouble.” Very graciously, he didn’t tell me “I told you so,” instead, knotting his tie with a slight grimace, seemingly bracing himself for the storm.

The intro I wrote probably didn’t help matters: “Our first guest tonight is one of the biggest stars in the world, and in the past 10 years she has sold over 80 million albums, starred in countless films, and slept with some of the biggest names in the entertainment industry.” But there was no way we could have anticipated what followed. It was the most censored late-night broadcast in television history, with Madonna saying “fuck” 14 times. She took off her underpants and complained when Letterman wouldn’t smell them. And if you think Letterman was happy about all the subsequent attention and newspaper coverage the interview brought, you’d have guessed wrong. He always understood the privilege that came with the ability to broadcast, and the responsibility that accompanied it. Ratings and press were less a consideration.

Compounding matters was the fact that Madonna would not leave the stage. We bumped the next guest (a grocery bagger — an annual human interest competition winner that Dave, a former bagger himself, genuinely always enjoyed). Dave tried to say goodbye again. She wouldn’t leave. Counting Crows was just about to make its network television debut — and we were going to have to bump the band if Madonna didn’t budge. Sheila Rogers, the talent executive who has possibly given more bands their first breaks than anyone in the history of TV, went to Morty to ask what was happening. Morty then turned to me and said, “Get rid of her.” I said, “How am I supposed to get rid of her?” But the implication was clear: This was a problem I’d created, and now it was up to me to salvage the rest of the show. As Paul and the band blasted their mid-break song, I walked onstage and said loudly, “Say hi to the audience.” Madonna waved. As she waved, I took her hand, as if I was helping her up — and I did, in fact, lightly pull her up. And over the band I said loudly again, “Say goodbye …” Confused, she waved. Still holding her hand I led her offstage.