The pain began when I was 18: cramps like a torsion in the bowels, shock splashes of blood in the toilet bowl, the weakness after a dozen bouts of diarrhoea. I would feel porous, ghostly, like cirrus, as if solid things could pass straight through me. When I was a child, I thought illness was just an interval, at worst a few days in bed, my mother stirring glucose powder into fresh orange juice, using a kettle to fill the bedroom with steam, the world waiting outside until you were ready to step back into it. But this was a new region of experience and language: my abdomen inflating like a balloon as doctors pumped air in via sigmoidoscopes, plastic tubes threaded down my nose and throat into the stomach and ileum, litres of heavy barium milk betraying the sausagey coils of my intestines to x-rays, the “sharp scratch” mantra of phlebotomists after fixing the tourniquet and pressing a latex finger to the vein, the companionship of drip-stands, the quick taste of metal before you went under; canulas and endoscopes; the splenic flexure and the Houston valve; ulcer, granuloma, Crohn’s disease.

There are things we only think about when they go wrong: the fanbelt, the combi boiler, the bowel. Before illness I must have imagined a gummy muddle behind my navel, but now gastroenterologists drew me a tube stretching 20ft from mouth to anus, air and light at each end, an ingenious pipework that incorporated oesophagus, stomach, small intestine, ileum, colon and rectum, and contained 100m nerve cells or neurons, more than in the spinal cord, as well as 95% of the body’s serotonin. I began to feel, specifically, the topography of the colon or large bowel sitting across my abdomen – the ascending, sigmoid and descending colon, the bends at spleen and liver known as the splenic and hepatic flexures – which, when healthy, is a brilliant gourd absorbing 10 litres of liquid a day (water, saliva, gastric acids, biliary secretions, pancreatic juice), but which in my case had become the messy red bioscape of ulcers, inflammation and scar tissue I saw in photographs from colonoscopies, a tiny mobile eye with its miner’s headlamp probing the dark, curving tunnels.

This vantage was strange enough, but soon I would see my bowel in a new light, not just at first-hand but actually next to or beneath my hand, as surgeons cut a hole in my abdomen, above my right hip, and brought a loop of intestine out through it, slicing it open so the slurry of partly digested food known as chyme would stream straight out of my front into a bag. When I came round, I could hear the bleeping of cardiac monitors along the ward and sometimes louder bleeps that seemed cause for concern, but turned out to be nurses heating up ready-meals in the microwave. I wanted to see my stoma, the spout of intestine poking out above my hip; I wanted to meet it, this new presence in my life, already attributing to it an autonomous personality, as if it weren’t really part of me at all.

In the morning, a nurse swept a curtain round my bed and drew the covers back, and I looked down at the small, clear plastic bag smeared with blood and yellowish foam, and inside it a knob or bulb of wet, soft, pink-red tissue like the gums or tongue. The nurse saw that I was frightened and tried to reassure me; she said there were no nerves in it to register pain, that even if she inserted her finger into my side I wouldn’t feel it. Dreamy on anaesthetic, I imagined her pushing first her finger and then her whole hand into the wound, up to the wrist, until she could have closed her fingers round my appendix or spleen and pulled them out of me, no blood to suggest anything unusual had occurred.

Of course, you get used to almost anything and although it seemed bizarre to be going home with a green plastic briefcase full of equipment – a selection of Coloplast, ConvaTec and Dansac bags, spare white plastic clips like barrettes a girl with long hair might use, Peri-Prep sterile wipes, special curved scissors for cutting holes in the card flanges – I soon fell into routines, kneeling at the toilet to empty the pouch; washing and drying; shoving all the dirty kit into the kind of odour-resistant plastic sack you would use for nappies or dog messes, then fitting a fresh appliance over the stoma, pressing the flange to warm the adhesive, fixing a clip to close the opening. I had never guessed how interesting it would be to keep tabs on these interior goings-on, to feel this bag hitched to my front like a sporran fill up with effluent that could be thick like porridge or watery like fruit juice or a minestrone bobbing with lettuce shreds and peas, to have such a window on my hidden basic processes, to see quite how much gas (or flatus, as ostomists learn to call it) came out of me during the night, so that in the morning my bag would be inflated like a zeppelin, straining at the glue, and in the bath would function as a buoyancy aid that drew my hips up to the surface of the water.

Facebook Twitter Pinterest Fiennes at about the time he was diagnosed with Crohn’s disease. Photograph: William Fiennes

Then there was my fascination with the stoma itself; stoma from the Greek word meaning mouth, this pink teat above my right hip that sometimes relaxed and lengthened until it hung from my abdomen like a second penis. Once in the swing of changing the bags I learned that my stoma had moods, a mercurial personality – how sometimes it puckered into a bud like a nipple, tight against my skin, and sometimes loosened, elongated and became animated, feeling out the spaciousness beyond the body, so I would think of an eel venturing out of its hole in a reef or the scene in Alien where the creature punches out of John Hurt’s chest to check out the mess room.

Depending on how recently I had eaten and how relaxed I was, the stoma might be working, pushing out or dribbling chyme into the toilet pan, and sometimes I had a sense of appalled wonder that I should be able to watch my own inner functions like this, the muscular layers working in a wringing action to squeeze out liquid, peristaltic waves of muscle contractions moving the faecal stream through the bowels, and all of it going on beneath consciousness, by autonomic innervation, like the heartbeat … Fascination, yes. But also disgust. Sometimes the bag would peel off in the night and I would wake to the smell and warm damp of my own excrement spreading across my stomach. Sometimes I stared at it in the mirror, this unnatural ornament, the pink bulb of gut stitched on to my side, the pouch of sewage I carried with me through the days. I imagined a myth in which, after some transgression or crime, gods forced a man to carry his shame around with him in a sack stitched on to his belly or side. I thought my stoma and its paraphernalia were the inverse of sensuality, a tag denying me access to erotic life; I couldn’t imagine undressing in front of anybody, revealing the shitty baggage under my shirt; I couldn’t even imagine holding someone, or dancing close against them, when they might feel, through clothes, the gummy knob above my hip, the plastic clip, the suspended, sludgy mass. I dreamed a woman I’d never met was kneeling in front of me. I wasn’t wearing a bag, my stoma was clean and exposed – she leaned forward and kissed it, and I woke up almost breathless with the intimacy of that gesture. She might have been kissing my liver or the valves of my heart, places on the inside no one was ever meant to have access to, though there was a sort of tactile logic to that encounter of mucosal tissues, the bowel’s vulnerable softness happy against the tongue’s.

Sometimes I scanned the faces in crowds, wondering if there were others like me among them, other ostomists with their stashes of Peri-Prep wipes and carbon-filter flatus valves, and perhaps the newer two-part appliances with click-on connections. Even though we couldn’t recognise one another, we were members of a secret society, possessors of an organ most people would never encounter in their lives; we were the ones who knelt at toilets to empty ourselves and knew what it was like to defecate upwards from our navels during the night and how good it felt to stand in a shower with no bag glued to your skin, hot water streaming over the soft pink worm that lived in your side, a sensation of water sluicing down the interior of your body. And I thought of the moment the slit in my gut would be sewn up again and my tubing stuffed back into the cavity it had always belonged in, when my inner parts would be hidden once more and I would no longer be this human Pompidou centre that flaunted its pipes on the outside; I would be whole, as nature intended, my body restored to me. I would begin again.

I didn’t know about prolapses, how some ostomists might experience their intestine spilling from the hole in their front like a sleeve pulled inside-out, so it was a shock to find one afternoon that my stoma was longer than usual – in fact, as I pulled the bag away from my body, I couldn’t see the end of it at all, the mouth, just this long pink hose coiling up in the plastic. I dropped the bag and clutched the dangle of bowel against my abdomen, six or seven inches of it, thinking more and more of it might keep emerging, feeling I was coming undone, the stuffing emptying from the doll. I had heard about early sorts of proto-stomas, soldiers hundreds of years ago who found their abdomens ripped open by musket balls and caught the tumble of guts in their hands. I had seen paintings of Saint Erasmus, Roman persecutors using a windlass to wind his intestines out from a hole in his abdomen, so that man and contraption seemed attached by a taut umbilical rope. Later I dreamed my bowels were sliding out of me into a colander, slippery and hot, like tubes of cooked pasta. Soon paramedic Dawn in a green jumpsuit had me lying back on the bed. She stood over me and with her own gloved hands ushered the worm into my body. It slid back in until there wasn’t even a protruding teat, just a mouth flush to my skin like a whale’s blowhole, and it seemed wrong somehow that nothing should have hurt, that this confusion of corporeal order and form should have taken place without any pain to indicate danger, an event for which evolution had never developed protocols.

Now this seems a long time ago, two years in my early 20s when I came to know my bowel as more than an abstraction. Days after the surgeon stitched up the little mouth and tucked it inside the crowded abdominal cavity, I stood in front of a mirror, peeled the dressing off and looked at my unpunctured torso – amazed, as if I had been put back together, made whole again. I didn’t guess that I would come to miss it sometimes, the weight of the pouch in my hand, the surprising sweet smell of the chyme, the handicraft pleasure of using curved ostomy scissors to cut bespoke holes in the bag flanges, the stoma itself like a rare pet of unpredictable modes and moods – puckered teat, loose dangle, worm making quizzical extensions into the world. I look down at the scar above my hip and think of it alive in its warm red nest beneath my skin.

From Beneath the Skin: Great Writers on the Body (Profile Books and Wellcome Collection) £12.99. Body of Essays will be broadcast on BBC Radio 3 from Monday 29 October – Friday 2 November, 10.45pm.