Sandman would not have happened without Lou Reed – and I named my daughter after Warhol's Holly Woodlawn, from Walk on the Wild Side. I am sad today

'There are certain kinds of songs you write that are just fun songs – the lyric really can't survive without the music. But for most of what I do, the idea behind it was to try and bring a novelist's eye to it, and, within the framework of rock'n'roll, to try to have that lyric there so somebody who enjoys being engaged on that level could have that and have the rock'n'roll too." That was what Lou Reed told me in 1991.

I'm a writer. I write fiction, mostly. People ask me about my influences, and they expect me to talk about other writers of fiction, so I do. And sometimes, when I can, I put Reed on the list, and nobody ever asks what he's doing there, which is good because I don't know how to explain why a songwriter is responsible for so much of the way I view the world.

His songs were the soundtrack to my life: a quavering New York voice with little range singing songs of alienation and despair, with flashes of impossible hope and of those tiny, perfect days and nights we want to last for ever, important because they are so finite and so few; songs filled with people, some named, some anonymous, who strut and stagger and flit and shimmy and hitch-hike into the limelight and out again.

It was all about stories. The songs implied more than they told: they made me want to know more, to imagine, to tell those stories myself. Some of the stories were impossible to unpack, others, like The Gift, were classically constructed short stories. Each of the albums had a personality. Each of the stories had a narrative voice: often detached, numb, without judgment.

Trying to reconstruct it in my head: it wasn't even the music that sucked me in, initially, as much as it was a 1974 NME interview I read when I was 13. The opinions, the character, the street smarts, his loathing of the interviewer. He was in the Sally Can't Dance phase, drugged out, the most commercially successful and most mocked album of his career. I wanted to know who Reed was, so I bought and borrowed everything I could, because the interview was about stories, and stories that would become songs.

I was a Bowie fan, which meant that I had bought or borrowed Transformer when I was 13, and then someone handed me an acetate of Live at Max's Kansas City and then I was a Lou Reed fan and a Velvet Underground fan. I looked for everything I could. I hunted through record shops. Reed's music was the soundtrack to my teenage years.

I saw him at the New Victoria when I was 15, on the Rock'n'Roll Heart tour. He kept stopping to tune his guitar. The audience cheered and yelled and shouted "Heroin!" At one point, he leaned in to the mic and told us all to "shut the fuck up. I'm trying to get this fuckin' toon right."

At the end of the night, he told us we'd been such a crummy audience we didn't deserve an encore, and he didn't do one. That, I decided, was a real rock'n'roll star.

I was 15 and playing Transformer in the art room at school. My friend Marc Gregory came over, with a request. His band covered Perfect Day, but he'd never heard the Reed original. I put it on for him. He listened for about a minute, then he turned around, puzzled, looking uncomfortable.

"He's singing flat."

"He can't be singing flat," I told him. "It's his song."

Marc went off disgruntled, and I still believe I was right.

When I was 16 and had my first break-up with a girlfriend, I played Berlin over and over until my friends worried about me. Also, I walked in the rain a lot.

His music always stayed a part of my life … Reed performing in Brussels in 1974. Photograph: Bettmann/CORBIS

I was willing to sing in a punk band in 1977 because, I decided, you didn't have to be able to sing to sing. Reed did just fine with whatever voice he had. You just had to be willing to tell stories in song.

Brian Eno said that only 30,000 people bought the first Velvet Underground album when it came out, but they all formed bands. That may have been true. But some of us listened to Loaded over and over and we wrote stories.

I would see Lou's songs surface in the stories I read. William Gibson wrote a short story called Burning Chrome, which is his take on a Velvet Underground song called Pale Blue Eyes. Sandman, the comic that made my name, would not have happened without Reed. Sandman celebrates the marginalised, the people out on the edges. And in grace notes that run through it, partly in the huger themes, Morpheus, Dream, the eponymous Sandman has one title that means more to me than any other. He's the Prince of Stories too, a title I stole from I'm Set Free ("I've been blinded but now I can see/ What in the world has happened to me?/ The prince of stories who walked right by me").

When I needed to write a Sandman story set in hell, I played Reed's Metal Machine Music (which I've described as "four sides of tape hum, on the kinds of frequencies that drive animals with particularly sensitive hearing to throw themselves off cliffs and cause blind unreasoning panic in crowds" all day for two weeks. It helped.

The things he sang about were transgressive, always on the edge of what you could say: people pointed to the mention of oral sex in Walk on the Wild Side, but the easy gender changes were more important in retrospect, the casual way that Transformer took nascent gay culture and made it mainstream.

Lou Reed's music stayed part of my life, whatever else was happening.

I named my daughter Holly after Warhol superstar Holly Woodlawn, who I'd discovered in Walk on the Wild Side. When Holly was 19, I made her a playlist of more songs she had loved as a small girl, the ones she'd remembered and the ones she'd forgotten, which led to our having the Conversation. I dragged songs from her childhood over to the playlist – Nothing Compares 2 U and I Don't Like Mondays and These Foolish Things, and then came Walk on the Wild Side. "You named me from this song, didn't you?" said Holly as the first bass notes sang. "Yup," I said. Reed started singing.

Holly listened to the first verse, and for the first time, actually heard the words. "Shaved her legs and then he was a she …? He?"

"That's right," I said, and bit the bullet. We were having the Conversation. "You were named after a drag queen in a Lou Reed song." She grinned like a light going on. "Oh Dad. I do love you," she said. Then she wrote what I'd said down on the back of an envelope, in case she forgot it. I'm not sure that I'd ever expected the Conversation to go quite like that.

I interviewed Lou in 1991, over the phone. He was in Germany, about to go on stage. He was interested, engaged, smart. Really smart. He'd published a collection of lyrics, with notes. They felt like a novel.

A year or so later, I had dinner with him and my publisher at DC Comics. Lou wanted to make Berlin into a graphic novel. He was hard work: prickly, funny, opinionated, smart and combative: you had to prove yourself. My publisher mentioned that she had been a friend of Warhol's and faced a third degree from Lou to prove that she had been a real friend. Before he talked to me about comics, he gave me something approaching an oral examination on 1950s EC Horror comics, and challenged me on using a phrase of his in an issue of Miracleman I'd written. I told him I'd learned more about Warhol's voice from Lou's lyrics in Songs for Drella than I had from all the biographies I'd read, all the Warhol diaries, and Lou seemed satisfied.

I passed the exam, but wasn't interested in taking it twice. I'd been around long enough to know that the person isn't the art. Lou Reed, Lou told me, was a persona he used to keep people at a distance. I was happy to keep my distance. I went back to being a fan, happy to celebrate the magic without the magician.

I'm sad today. Friends of his are sending me brokenhearted emails. The world is darker. Lou knew about days like this, as well. "There's a bit of magic in everything," he told us: "And then some loss to even things out."