The year 2007 started and ended for me in the French Alps; a year bookended by identical days of glorious snow and lavish fireworks, skiing oligarchs and vin chaud. It was the year I turned 25, and although I probably didn't look that much older than I had when it started, it was also the year I grew up. I never particularly thought I'd be able to pinpoint the calendar year I "grew up", let alone the precise date, but in 2007, on the morning of the 19th of June, that is exactly what happened.

In March 2007 I was deployed to Helmand Province in Afghanistan. I had joined the army three years earlier at university – partly out of boredom and a sense of adventure; partly for the frisson of shocking liberal parents; and even a little bit out of an odd sense of duty. Sat idly on the sofas of grotty student houses watching men younger than myself being sent to new and dangerous wars in Afghanistan and then Iraq when all I had to worry about was bluffing my way through another tutorial, something made me want to do my bit, whatever the hell that "bit" might be.

Over the next three years there were many things which felt formative at the time. I had survived an intense and occasionally bewildering year at Sandhurst. The Royal Military Academy veered between frustratingly and quaintly Victorian, a caricature of boarding school with more guns, less Latin, and ferocious and terrifyingly professional colour sergeants instead of prefects, but it turned clueless students into half-decent soldiers and was strangely enjoyable. I had commanded snowball fights in decommissioned arms dumps in the Balkans, watched hippos through night-vision goggles on jungle patrols in Africa, been bored, drunk, tired, wet and even guarded Buckingham Palace, but I hadn't been to war. In 2006 my unit had been sent to Iraq. We had a tense tour and undertook some difficult jobs, patrolled dangerous streets, sat helplessly under beds while being mortared, and grieved for lost comrades, but we didn't actually do any fighting. In Afghanistan, that would all change.

On the one hand, soldiers being interviewed about heroic and brave deeds invariably mumble something about their training "kicking in"; on the other, grizzled veterans will tell you that nothing can prepare you for the first time you get into a proper fight. The reality is probably somewhere in between. What nothing had prepared me for was the heady and dangerously addictive cocktail of adrenalin and dopamine that surges through the body, the dopey fixed grin of surviving a near miss and even something fulfilling in the delayed exhaustion that hits you like a train after the battle is won. Far from making me grow up, the initial experience of being shot at and shooting back was in danger of bringing out the child in me. The battle-hardened Afghan soldiers it was our job to fight alongside nodded knowingly along and gave us cheeky thumbs-up and refreshing chai during lulls in the fighting. They already knew what no one had warned us in all our training and preparation: "war" was a terrible thing, but "combat" – combat was worryingly exciting; counterintuitively, wrongly, immorally but undeniably fun.

This was a feeling that couldn't last. For two months we cruised around the Green Zone in Central Helmand riding our luck, rolling through ambushes and pushing back an obstinate and unimaginative enemy. Those were the "good old days" before the dreaded IEDs littered the ground and the Taliban hadn't realised that they weren't going to beat us in an old-fashioned rifles and bayonets match – not when we had helicopters as well. Somehow we kept on coming through without so much as a scratch. That couldn't last either. Afterwards the company sergeant major swore he had "the feeling" the moment he woke up, but I didn't. All I remember of the start of the 19th was the oddly upbeat banter on the radio net: "Good morning to you, Amber 63, a fine sunrise."

"And to you Amber 60, a perfect day for a scrap."

The company commander and his HQ team were about half a kilometre down the road from our patrol base. We could see them parking up their wagons as we rolled out to trundle down the dirt track in ours to meet up with them. Hardly a long enough journey to even turn on our counter-IED devices, but that's what military training does, makes you a creature of habit. One of my fellow platoon commanders, "Kuks" – Lieutenant Folarin Kuku – was making his way down the same track with his team on foot. I offered him a lift, but he was deep in conversation with his Afghan counterpart, Major Hazrat, plotting their next victory, no doubt. Five minutes later we had just arrived at the rendezvous when a thud sent everyone diving to the ground and reaching for helmets. A thick cloud was already rising from where Kuks's team had been patrolling. "Shit!" someone shouted to no one in particular, but it seemed to sum things up perfectly. "IED."

We raced back down the track in the wagon just as a shaken voice came over the radio confirming what we all knew: they'd been hit and had taken casualties. Somehow I knew before we got on the scene that it was going to be Kuks, the irrepressible force with whom I'd trained, laughed and lived for the past months which might as well have been decades: my comrade, my friend. I steeled myself for the shock, but it didn't come at first. There was something too clichéd about the sight which greeted us – torn combats, dust and fearful eyes and blood, a Robert Capa photo come to life that I couldn't connect with reality even as we administered first aid and morphine to the injured. Kuks's voice, however, nearly knocked me flat. The deep, familiar voice of a friend was there somewhere, but buried beneath layers of pain and distress which cut through the detachment and made everything screamingly personal.

One of the young guardsmen impeccably tried to keep him awake as the morphine kicked in by trying to get him to count to 10 or recite the alphabet. "Don't bother, Riddle," we joked, "he went to Harrow, he can't count or spell." Weak humour, but what else was there, waiting for the life-saving Chinook to come, willing it to thunder over the horizon.

When it came, it wasn't the designated medical bird but one full of journalists returning from a stint in Camp Bastion, plunged suddenly into a noisy fight just as they thought they were heading home. The first girl I'd seen in weeks was sat in the prime viewing seat at the back, pretty even in blue helmet and body armour, but wide-eyed as four of us charged up the ramp with Kuks, bloodied and half-naked on the stretcher. I screamed his vitals to the medic over the roar and then suddenly, with nothing more to do, felt a yawning emptiness inside. The rear-gunner must have seen it a hundred times and gave me a friendly shove as they took off and suddenly I was lying flat on my back, winded and feeling sick, in the middle of a field a long way from home.

It felt like hours had passed; it had been minutes. We pushed on with the patrol, but any lingering sense of adventure was gone. Other units had taken casualties, we'd inflicted casualties; this shouldn't have been any different, but it was. That night I tried talking to all the guys, tried exploring the range of my own responses – anger, sadness, guilt, maybe even guilty relief that it hadn't been me. No one slept. We knew there would be further losses on the tour and, sadly, there were. No one was more or less tragic, each had its own significance to those involved, but for me the moment of 2007, of growing up, losing some sort of innocence and being rudely and directly confronted with horrible mortality will always be lying exhausted on my back, watching the disappearing helicopter with my bleeding friend inside.

By morning the word had come back that Kuks would be fine, the brilliant medics had even saved his leg and he was already on his way back to the UK for a cold beer in Sellyoak. So we cracked open a precious tin of sausages for a celebratory breakfast, cleaned our rifles and got back to work.

Patrick Hennessey is the author of The Junior Officers' Reading Club (Allen Lane, £16.99). Channel 4's TV Book Club will be discussing the novel on 30 January on More4 at 7.30pm

To read all the articles in this series, go to theguardian.com/lifeandstyle/series/once-upon-a-life