I had my last drink five years ago, in the early hours of the morning on 1 January 2013. I think it might have been around 2am. I wouldn’t have described myself as drunk. I would have said I’d had a few drinks. But I was drunk. If I had tried to drive, or write, or give a talk in public, I’d have done these things badly. Feeling neither happy nor sad, I raised the glass and swallowed the booze. It was some kind of fruit punch.

At the time, I didn’t think this would be my last drink. I thought it would be my last drink until my birthday, on 30 April. For 10 years, I’d spent the first four months of every year as a teetotaler. There had been two exceptions. One year I started drinking on 27 April, because I was in a houseboat in a harbour and I was offered a glass of wine. I hated myself for those three days. Another year I did not quit until March, but punished myself for that lapse with eight months of sobriety instead of the usual four.

But maybe, I often thought, sobriety wasn’t exactly a punishment. I liked sobriety. I slept better. I lost weight. My skin became clearer. I definitely felt fitter. My concentration improved; I could buzz through a book in a few hours. My mind was sharper. I felt lighter, happier. I no longer turned up to appointments late, sweaty, reeking of alcohol. I had more time. I remember one conversation after 15 teetotal weeks; the guy I was talking to said he couldn’t believe how young I looked. He really meant it. Sobriety rejuvenates you like nothing else.

Then my birthday, my drinking day, would come around again. I’d have a sense of nervous anticipation, a queasy feeling that I didn’t want to start drinking again, combined with a queasy feeling that I did. In any case, I felt compelled to start drinking again; that was part of the deal I’d made with myself, because I really wanted to drink. I wanted to drink for precisely the same reason that I didn’t want to drink – because I had a drinking problem. Drink seemed to have a strange, brain-sucking power over me. On my birthday, I would wake up feeling the sort of anxiety you feel before a date or a party. I was going to start drinking again. Tonight, I would be in a different world.

When I try to explain my drinking problem, it goes like this: in my head, I was a moderate drinker, but after I’d had a drink, I wasn’t. The more I drank, the more I wanted to drink. Drinking increased my thirst. I wanted the second drink more than the first, and I wanted the fifth more than I’d wanted the fourth. My thirst always increased over the course of an evening. But it also increased, in a more subtle way, over the course of a month, a year, a decade. Drink added something, but it always seemed to subtract more than it added, and the only way I could get things back to normal was to drink more, and all this drinking began to wreck my mind. And then I’d stop, and I’d be sober for 120 days. Being sober felt great. So why did I always go back to drinking?

The first few days of sobriety provided a clue. On day one I’d wake up with a hangover. The next day I’d wake up with a phantom hangover. The day after that I’d wake up, and put my head under the duvet, waiting for the pain and the sickness. For a few seconds, my mind would be racing. What did I drink last night? How much did I get through? And then I’d remember: nothing. I drank nothing. And without the shroud of a hangover, my mind would feel strangely defenceless; any emotion could just barge in and march around for hours. In those moments, I understood something about why my drinking was a problem.

During the times I did not drink, I was not aware of wanting to drink. I did not crave it or sneak around and drink secretly. Being sober made me think of chainsmokers whose craving disappears on long-haul airline journeys. They know they can’t possibly smoke, so they just put the whole thing out of their minds.

Marc Lewis, a neuroscientist and addiction expert, told me it was the same thing as when you put a piece of meat in the fridge, and your dog paws at the door, whining and trying to force the door open. But if you convince the dog the door is locked, it will stop whining and walk away.

Every year, I stopped whining and walked away. I went to pubs and bars and drank fizzy water. In the evenings I drank tea. I saw that most people, almost everybody in fact, did not care whether or not I drank at their parties. Some people don’t even notice. I just said: “I’m off the drink.” People just said: “Cool.” On planes I was happy not to drink the little bottles of wine. I did not drink low-alcohol drinks. I did not have little nips of this or that. I knew I was not going to drink, and this knowledge made me not want to drink. I felt in control. I knew I would drink again on my birthday. I had a persistent fantasy that, the next time I started to drink, things would be better.

They never were. I could never drink in moderation. I could never have just the one, or just a couple. I always wanted more. I was never quite in control of the amount I drank, as if my brain had been damaged. Something felt wrong, and this feeling of wrongness would get worse as the year wore on – summer worse than spring, autumn worse than summer. During the times when I drank, I had another persistent fantasy, which would pop into my mind every so often: a big, fat, round tumbler of super-strength vodka, shimmering under a layer of ice, so strong it smelled like petrol. The perfect drink. That was my fantasy when I drank, and it was still my fantasy on the day I slugged my last drink, some kind of fruit punch, in the early hours of 1 January 2013. In just 120 days, I thought, that big fat vodka will be there, in some fancy minimalist bar, waiting for me.

In the five years since that moment, I have not touched a drink, and I have not wanted to. My drinking days seem far away, almost like a life lived by somebody else. Drink – the very idea of it – seems rather sickening. Quaffing sour or pungent liquids in order to make yourself dumber? Preposterous! I have the same feelings about alcohol that I had when I was 10. It’s dangerous; it’s disgusting; it causes cancer; it rots your liver and makes you look, and smell, like a much older and sicker person. Still, I’ve never stopped wondering why it grasped me so firmly, and for so long, why I allowed it to ruin parts of my life, parts I will never get back. What did drink offer me that was so much better than sobriety? What, exactly, was its magic?

At the beginning, I drank because I was anxious, and because I was at boarding school. That’s the story I tell myself, and the story I told Colin Drummond, a consultant psychiatrist at the National Addiction Centre, King’s College London. I went to see Drummond at the end of November 2017 because I wanted an informed opinion on my drinking. We were sitting in his office on the Denmark Hill campus of King’s College. He listened and took notes while I told him my story. At boarding school, I told him, you are supervised inconsistently; sometimes you can sneak off without anybody noticing. I drank from the age of 15. Extra-strong beer in cans; vodka in quarter bottles, hidden in lavatory cisterns; pub lager. I wanted to escape all the time. Drink was not a proper escape, but it was a sort of escape.

At school, I often felt trapped and vulnerable; drink could improve my mood for a while. A pattern was beginning to form in my brain, a sort of learning. Not the sort of learning you’re supposed to do in school, but learning nevertheless. Drink also made me feel bad – sick and headachy afterwards. But the good began to override the bad. I remember the malty taste of extra-strong lager, the feel of the can in my hand, the rush of bubbles in my nose, and I remember the golden colour of beer in pubs, how cold it was when I took that first gulp, how clean and cheering it felt as it went down. Once I was in a pub, aged 16, and I took a swig of lager from a pint glass, and it was perfect, and that perfection imprinted itself in my mind, and for decades I would buy pints of lager and swig them and sometimes feel a twitch on the thread connecting me to my younger self.

After a while, I told Drummond, a pattern emerged – a pattern I hadn’t noticed until now. My drinking came in fits and starts. A lot at school. Then quite a lot in my gap year. Not so much at university. Then I moved to London, to work as a freelance journalist, and started drinking more heavily. Three years later, when I moved out of London, I drank much less; six years after that, when I moved back again, I drank a lot more. My entire social network was being taken over by pubs, and bars, and people who liked to drink in pubs and bars, and people who liked to drink at home. Drink had woven itself into the fabric of my life. It felt as if I didn’t know anybody who didn’t drink. That was when I started trying to quit.

Talking to Drummond made me think about the pattern. There were three bouts of heavy drinking, each more serious than the last. In the first two bouts, in my teens and then in my mid-20s, I responded to stress – the stress of school, the stress of work – by drinking alcohol. In the third bout, when my drinking escalated dramatically, it was as if the alcohol itself had become a stressor.

‘I’ve never stopped wondering why it grasped me so firmly. What did drink offer me that was so much better than sobriety?’ … William Leith. Photograph: Antonio Olmos/The Guardian

Some people drink, and then they drink more, and at a certain point, they become obsessed with drink. I always used to notice bottles, the shapes of bottles, the labels and coloured glass. Just looking at the bottles would make me feel a rush of desire. I would know which pubs stocked the strongest beers and ciders, just in case. I loved walking around off-licences, and picking up bottles, and holding them. Sometimes, in the middle of the day, I’d go into an off-licence for a few minutes and talk about wine or whisky with the person behind the counter. For a year, I took a wine course, because wine seemed civilised. I sat in a classroom, one evening a week, talking about wine, and drinking wine, and taking notes. Afterwards, I’d go off with another member of the class, or perhaps two, for a couple more bottles of wine. There were always bottles in my life, bottles everywhere, more bottles than I could believe.

All this time I was in a relationship, and we both drank. I drank more than she did. Our friends drank. When friends visited, I would open the wine in the kitchen, and pour one bottle into four glasses. I’d take the first two glasses and give them to the guests. Then I’d go back into the kitchen and drink one of the glasses as quickly as I could. Working against the clock, I’d open a fresh bottle, refill my glass, and join the other three people, who would be tucking into their drinks. But drinking always increased my desire to drink, so I would finish my second glass before the others had finished their first. Then I’d go back into the kitchen for my first “official” refill. By the time everybody had had three drinks, four bottles would be gone. There was a solution, of course – to buy five bottles. With drink, there always seems to be a solution.

“It creeps up,” said Drummond. “It’s insidious. I don’t like to think it’s ever too late, but it becomes harder and harder to do something about it once it’s got a grip on people.”

Drummond asked me about my family. Was there alcoholism in my family? Sometimes it’s hard to know, because alcohol, its entire culture, emanates a cloud of secrecy. I thought about my family. My grandfather, my mother’s father, drank robustly, to say the least. My brother drinks robustly. My mother hardly drinks. A glass of wine here and there. Maybe two at a wedding. My father drank very little until late middle-age. Then he drank in small amounts. When he retired, he drank more. In his 40s, a very light drinker, he used to warn me about my drinking. By the time I quit, he was in his 80s, and drank every day. I never saw him drunk; he claimed never to have been drunk. But I worried about the brandy, the rum, the gin. Our roles had reversed; now I would warn him about alcohol. I had never heeded his warnings; I don’t suppose he heeded mine, either. When you drink, it can be impossible to think clearly about your drinking.

Alcohol was the drug of choice for both my 16-year-old self and my 86-year-old father: that says something. Drummond listed some of the reasons why alcohol is so attractive: “It makes you more relaxed, it makes you more gregarious, it makes you more confident in social situations, it relieves stress, it actually lifts you up sometimes when you’re feeling low, as an initial effect – so it’s got all these properties.” He thought about this for a while, and then said: “Chemically, it’s an all-rounder.”

How does alcohol do all the things it does? How did ethanol, when ingested, give me those perfect moments of escape? And why did my search for those perfect moments turn into a pernicious obsession? I asked Marc Lewis, a professor of neuroscience at the Radboud University in Nijmegen in Holland. Lewis has written, brilliantly, about his own experiences with alcohol, opiates and several other drugs in his book Memoirs of an Addicted Brain.

When the golden lager or shimmering vodka slipped down my throat and entered my brain, Lewis explained, it changed my mood by tampering with several neurotransmitters – the chemicals that enable neurons, or brain cells, to communicate with each other. When you have a thought, or an idea, or a feeling, it is because neurons in your brain are joining up and forming pathways, facilitated by neurotransmitters. The neurotransmitters direct the brain’s traffic. Two of the most important ones are glutamate and gamma-aminobutyric acid, or Gaba. Glutamate promotes brain activity; Gaba inhibits it. Booze acts as a red light for glutamate and a green light for Gaba.

Think about that for a moment. Gaba hinders communication and glutamate helps it. Booze helps the hinderer and hinders the helper. In Memoirs of an Addicted Brain, Lewis describes what happened when he got drunk for the first time: “The sites of glutamate transmission become numbed and ineffective, so information flow is now sluggish, with big signals still getting through while small signals fade into static.” Furthermore: “It’s Gaba’s job to fine-tune thought and perception, to clarify things, but now things are clear to the point of caricature … In other words, I am thinking about very little, but I am thinking about it with magnificent clarity.”

Alcohol, then, stops you thinking too much. It slows down the hamster wheel of anxiety. It simplifies. It redacts. Of course, that’s not all it does. It also tampers with the brain’s reward circuit. When you drink, another neurotransmitter, dopamine, is sent all over the brain. Dopamine is the neurotransmitter of anticipation, of excitement, of wanting more. Dopamine floods your brain with a sort of excited hunger, the sensation of being in thrall to something. The American writer Elizabeth Wurtzel wrote a book about her addictions called More, Now, Again; this raw desire is a good description of how a surge of dopamine makes you feel. As the famous drinker Kingsley Amis once said, it’s not about being drunk, it’s about getting drunk. It’s about that magic moment of rapture on the way to somewhere else. The sweet spot – the exact moment when anticipation and reward are in perfect balance.

I began to notice something about the perfect balance. It seemed to be getting more elusive. The amount of euphoria and excitement a drink could provide, measured in intensity and time, seemed to be diminishing. That’s because, when you tamper with the brain, it always tries to undo the tampering. When you trick it, it gets wise. When you flood it with chemicals to make it feel rewarded, it will find ways to feel that reward a bit less intensely. So you need to drink a bit more to get the same buzz. And then more, and yet more. In the short term, Lewis explained, desire increases as the reward gets closer. But over the longer term, the dopamine surge of desire is never equalled by the “second surge”, when you actually swallow the drink. Desire grows as fulfillment shrinks; anticipation nags as reward becomes less rewarding.

Something happens to the prefrontal cortex, the centre of decision-making in the brain. Imagine every thought you might have as a narrow pathway. Now imagine an obsessive, dopamine-fuelled thought happening over and over. It becomes a trunk road, and eventually a motorway. There are no other routes. You find yourself in a difficult situation. You want to drink, but drinking is making you ill. You feel ill, but you want a drink. You are full of wanting. So you drink. And it doesn’t work like it used to.

In her memoir Drinking: A Love Story, the late American writer Caroline Knapp said that there was a fine line between problem drinking and full-on alcoholism, but that, as a drinker, you never see it. You cross it without knowing you’re crossing it. I’ve known other people who are about to cross the line, or who have already crossed it. I’ve talked to them about their drinking. They tell me they don’t drink very much, or that they’re cutting down, easing up, limiting themselves to one or two. I can tell they’re not telling the truth. They are lying to me, they are lying to themselves. These conversations make me angry, largely with my former self.

I sometimes wonder when I started lying to myself. It wasn’t at school. At school I was full of bravado: “I had the vodka, and then a can of Breaker, and then a pint of Kronenbourg … ” Nor in my 20s. In my 20s the bravado still existed; drinking carried a certain status. The lying, the deception, must have started in my 30s. Buying five bottles of wine instead of four. Stashing bottles around the house. Drinking part of a bottle of whisky in someone else’s house, and then a bit more, and realising you need to buy a new bottle, and hoping you can get away with it. Caroline Knapp writes about drinking someone’s port, and buying a new bottle, and trying to pour precisely the right amount out of the new bottle to make it look right.

You cross the line when you start lying to yourself. But you never know where the line is. Colin Drummond said that some people go out after work with colleagues and have a single drink, then go home and spend the rest of the evening drinking on their own. I had done a similar thing, but at one step removed. I would go out with colleagues, who liked to drink a few drinks, then I’d go to meet some other friends who liked to drink yet more, and then, late at night, I’d find myself in an after-hours bar with people who liked to drink deep into the night. We’d snort lines of cocaine, which would keep us awake, so we could drink more. I remember emerging from an after-hours bar, walking up the basement steps to pavement level, and seeing that it was already light. Not only light, but sunny. That was a dark moment. It kept happening, that moment.

‘You want to drink, but drinking is making you ill. You feel ill, but you want a drink. You are full of wanting. So you drink. And it doesn’t work like it used to’ … William Leith. Photograph: Antonio Olmos/The Guardian

I didn’t stop drinking. Not right then. I carried on, knowing I needed to do something. But drinking had me stuck in a rut. The decision-making zone of my brain had become excellent at making a single type of decision: drink! I walked along the street, trying to duck into the shadows. I hailed a taxi, went home, fell asleep.

At a certain point, the sweet spot begins to disappear. You search for it. You search for it by drinking more. The hangovers get worse. You spend at least half of each day fighting a hangover. You lie in bed until the last possible moment. You have sharp pains behind your eyes. You feel paranoid and anxious. You sweat. Your sweat reeks of booze. You like yourself less and less. So you drink. It works, a bit. Then a bit less.

And then, 15 years ago, came the beginning of the end. Every problem drinker who decides to quit drinking has a story like this. I’d been out drinking. I was drunk. I had a feeling of not drinking enough, of wanting more, and I came home and went into the kitchen. There was a half-full bottle of vodka in the freezer. I poured some vodka into a glass, and topped up the glass with orange juice, and drank it. Then I poured the rest of the vodka into the glass, added orange juice, and drank that, and the vodka was gone. I was filled with a powerful urge to drink: finally, the sweet spot. All I had to do was go to the shop across the road. I looked out of the window – the shop was closed. I’d missed it by five minutes. The urgency left me, and I just went to bed.

I didn’t think about any of this for weeks, or even months. But I remembered it as January approached. “I’ll quit,” I thought. And “Really.” And: “Until my birthday.” Ten years later, I would have my last drink.

‘How much were you drinking, at your peak?” asked Colin Drummond. My answer came quickly: two bottles of wine a day. That’s what I tell myself I drank. Eight large drinks a day. Fifty-six drinks per week. I remember somebody saying that the recommended amount was 28 units. “That can’t be right,” I said. “I don’t drink 28 units per day – more like 25.” Of course, the recommended amount was 28 units per week. Now it’s 14. And that’s the upper limit. Two bottles of wine doesn’t sound so bad. But I was drinking too much by a factor of 10.

I spent 10 years drinking out of control, and 10 years quitting.

Why did I drink? I drank because I was anxious, because it helped me talk to people, because worrying about my drinking helped me to stop worrying about other things, things that really stressed me out, such as writing. Drinking relieves stress, and then causes it, but the stress caused by drinking, at least for a while, helps to screen out your real worries. And then drinking becomes a real worry. You cross the line, but you don’t see it, so you keep on going.

“A familiar story,” Colin Drummond said, after I’d told him everything. I had some unhappiness in my teenage years. I was at boarding school. I started drinking early. Looking at my family, there might be a genetic component. I had wanted to be an academic, but ended up as a journalist, a profession that often gives rise to drinking problems. A susceptible brain had been placed in the firing line. A perfect storm. Case closed.

Why did I stop? Lots of people ask me this question. I have lots of answers. For health reasons. For mental health reasons. Because it wasn’t worth it. Because it had run its course. Because I didn’t want to feel ill all the time. Because it had ruined me. Because I couldn’t just have one. Or two. Or three. I was obsessed with it. I couldn’t see a happy ending. A long time ago, it had made me feel good, but something had changed. People have told me quitting is hard. They ask me why it was easy for me. I don’t know, I say. I kept giving abstinence a chance. Abstinence won.

It’s been five years now. Sobriety is awesome. My brain really does believe that. Being sober is much better than I thought it would be five years ago, in the early hours of 1 January. But that wasn’t the real turning point. The real turning point came 120 days later, on my birthday, the day I was due to start drinking again. I was sitting in a restaurant with my girlfriend. She asked me if I was going to order wine. Up until that moment, I had assumed I would. But something happened in my brain. An unexpected decision. “No,” I said. “I think I won’t.”

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.