“Could I really stab someone with my bayonet, twist it around, and then pull it back out? I mean, what would the neighbors think?” It’s a funny line from late in this staging of Spike Milligan’s war memoirs, one which also points to the tension in wartime between civilization and barbarism. The division between these seeming opposites has of course been blurred in recent times, where maintaining our civilization entails committing barbaric acts abroad, outsourcing the barbarism. For Milligan, getting through WWII meant bringing to the mayhem a civilization of the humorous kind, and this show plays as a kind of greatest hits of the comedy he entertained himself and fellow soldiers with.

Taking material from the first four of seven volumes of embellished war memoirs that consist of narrative prose, sketches, photographs and diary and letter extracts, we follow Milligan (a well-cast Sholto Morgan) through episodic scenes/skits that take him from his front yard to the battlefield. Along the way he teases authorities and shares in camaraderie, always deflating the intensity of the war with irresistible flippancy, and finally feeling the weight of the war bare down.

Co-adapting with Ben Power, director Tim Carroll successfully transfers the raggedy, undisciplined wiliness of the source material to the stage, crafting a fantastically unwieldy piece of theatre. During the war Milligan alternated between being a troop with being a musician, so it’s appropriate that in this show he does the same, the strong ensemble treating us to jazzy tunes that complement and enrich both the comedy and, later, the pathos. It only hints at the severe depression that was to come for Milligan, but in this we get a worthy theatrical rendition of how a great comic mind turned the horrors of war into something more psychically manageable: comedy, but with the hint of barbarism lurking underneath.

Royal Lyceum, Edinburgh, until Sat 10 Oct, then touring