In 1970, when I was 22, I moved to Norwich and lodged in a small, pleasant room on the edge of the city. I had come to do an MA in English at the University of East Anglia, but my overriding purpose was to write fiction. At the end of my first week, with all arrangements made, I sat down at a card table by the end of my bed one evening and told myself that I would work continuously through the night until I had completed an entire short story. I had no notes, only a scrap, a dreamy notion of what sort of story this would be.

Within an hour, a strange voice was talking to me from the page. I let it speak. I worked on into the night, filled with a romantic sense of myself, the writer heroically driven by a compelling idea, pushing on towards dawn as the city slept. I finished around 6 o’clock.

The story was called “Conversation with a Cupboard Man”, one of a handful I wrote that year that went into my first book, First Love, Last Rites, published in 1975. Its narrator was a man who didn’t want to grow up – a strange choice for me because I considered myself that year to have finally reached adult independence. Being in Norwich was the first major decision I’d taken in my life without reference to or advice from anyone else. I wanted a fresh start after undergraduate life. I regarded myself as a full-time committed writer. An MA was what I could do in my spare time. An academic grant would support me.

Other strange voices, other weird or wretched characters, surfaced in that year to haunt or infest my fiction. Violent, sexually perverse, lonely, they were remote from the life I was living in Norwich at the time. I was meeting many new friends, falling in love, keenly reading contemporary American fiction, hiking the North Norfolk coast, had taken a hallucinogenic drug in the countryside and been amazed – and yet whenever I returned to my notebook or typewriter, a savage, dark impulse took hold of me. Sibling incest, cross-dressing, a rat that torments young lovers, actors making love mid-rehearsal, children roasting a cat, child abuse and murder, a man who keeps a penis in a jar and uses esoteric geometry to obliterate his wife – however dark the stories were, I also thought elements in them were hilarious. Sometimes I persuaded myself I was some kind of wild man, a fauviste, kicking against the bourgeois divorce novel that people complained about.

Forty years on from the publication of that little volume of stories, I’m bound to have a different view. Of course, English literary culture in 1970 was far more diverse than the so-called Hampstead divorce novel. The 2010 “lost Booker” shortlist was powerful proof of that. Besides, divorce is a rich subject, Hampstead a legitimate place. Up until my arrival in Norwich I’d been an intense, somewhat shy or reserved child and teenager. I hadn’t caused much trouble, had uncomplainingly passed through the educational mill, and come to sex and drugs later than most – respectively, at 18 and 21. Fiction was part of a genial explosion in my life, of a sense that with my formal education more or less over, I could do whatever I wanted.

And as far as I was concerned, fiction was synonymous with freedom. The legal struggles to publish Joyce’s Ulysses, the Lady Chatterley trial, the wild transgressions of books such as Roth’s Portnoy’s Complaint and Burroughs’s Naked Lunch persuaded me that to write fiction was to be obliged to take the reader by the hand to the edge – and jump. The business was to find a boundary, then cross it.

The first edition jacket.

If they came to court today, those novels of Joyce and Lawrence would certainly be allowed into the public domain without much trouble. But I’m not so sure what would happen in the courtrooms of Twitter. For now we live uneasily with our sexual freedom. Revelations of horrific and widespread child abuse have shocked us into uncertainty. Adults, especially men, have to be careful about speaking to children in the street. Feminists were right to tell us how oppressive public expressions of male desire could be. (If you doubt it, have another look at the excruciating, unfunny and embarrassing 1955 Marilyn Monroe movie The Seven Year Itch.) But desire, in women as in men, is a reality, a subject. Can’t we tell it from oppression? When Craig Raine published in May this year a wistful, clever poem about an ageing man’s hopeless erotic thoughts, it stirred rage, hatred and fantasies of violence, of vengeful genital mutilation across the social media. When a Jilly Cooper novel was reissued recently, the original cover of 30 years ago was altered to suit modern tastes – a man’s hand was politely raised from a woman’s buttocks to her waist. Meanwhile, in books and especially on screens, sexual explicitness continues to flourish. Culturally, we are neither puritanical nor “liberated”. Just profoundly confused.

The uses and abuses of freedom were the air we breathed in 1970. I feel neither nostalgic nor dismissive about those times now. There were gains and there were, plainly, excesses. When I showed my stories to Norwich friends, or to the two novelists who were keeping an avuncular eye on me, Malcolm Bradbury and Angus Wilson, no one was shocked, no one thought my stories were outrageous or immoral. Bradbury would say something like: “Not bad. When can I see the next one?”

By the mid-70s, the “60s” were winding down. The culture was waking up with a headache, and beginning to take stock. When it appeared in hardback, First Love, Last Rites was considered a critical, though certainly not a commercial, success. But even the positive reviews were scandalised. What monster had come among us? In fact, it was sometimes hard to tell the good reviews from the bad, for both listed with relish the obscenities and baroque perversions. It was difficult for me then, and would be even more difficult now, to persuade readers that my intentions were actually moral. My amoral first-person narrators especially were supposed to be condemning themselves out of their own mouths. I thought it was more interesting for the author not to intervene.

As I read, I could smell tidal river mud from that high First Love, Last Rites summer of 1971

Before writing down these thoughts I took a copy of First Love, Last Rites from my shelves in order to read the title story. This copy once belonged to my parents, and has my dedication, dated 24 April 1975. (They were very proud, and a little horrified.) I don’t think I’d read the story since I corrected the proofs in late 1974. Once I was over my irritation with commas serving as full stops (a trick I must have learned from Beckett), I found myself looking across the span of my adult life – from 22 to almost 67.

A pregnant rat scrabbling behind a skirting board was an invention, but the beautiful, self-contained teenage girl, her boisterous and charming younger brother, their family at a point of disintegration, the small fishing town and a doomed eel-catching business were all briefly part of my life. As I read, I could smell tidal river mud from that high First Love, Last Rites summer of 1971. The 45 years that had passed since I wrote the story shrank to nothing. It’s in the very nature of fiction that it lives suspended in a perpetual present tense. The past you think you’ve forgotten sits at your shoulder, waiting to remind you that life is indeed brief and you’d better make the best of what’s left.

• The 40th anniversary edition of Ian McEwan’s First Love, Last Rites is published by Vintage.