From Epicurus Wiki
Being a registered citizen of the deme of Gargettos, and a descendant (albeit of an impoverished branch) of the ancient clan of Philaidai, Epicurus went to Athens to fulfill the requirements of the "ephebeia" (literally: adolescence), i.e. the military service to his city-state. Considering, however, how Athenian power (or even independence) had been severely curtailed by the Macedonian conquest and its various political consequences, it is doubtful that Epicurus' experience in the Athenian military was the hallowed rite of passage it was held to be by the youth of, say, the Periclean era.
Regardless of how meaningful (or not) this period of military service was to Epicurus, it is notable that during this time, he could have become acquainted with Menander, who subsequently became the leading figure in the so-called New Comedy, whose colorful and always flawed characters paint a vivid picture of social circumstances in his and Epicurus' contemporary Athens. While the foibles of Menander's characters (e.g., in Ho Dyskolos, "The Grouch") may have been deliberately exaggerated by poetic license for the purpose of hilarity, they are also plausible human flaws that provide an exhilarating dimension to Epicurus' various "thou shalt nots".
Apart from his perfunctory, peace-time service in the Athenian military, there is no record that Epicurus ever participated in any military campaign(s), either in Greece or abroad. By the time of post-Alexandrian, Hellenistic Athens, few Athenians did so, except as mercenaries in the various and sundry armies that traversed the Eastern Mediterranean, at the service of a wildly disparate array of generals, warlords, epigones, and aspiring local rulers. As can easily be surmised from his beliefs, Epicurus had no part in all that.